query = $query; } public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->orderBy('id'); return $query; } public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { $query->filterBySection($this->section); return $query; } public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface { return $query; } public function getOneByCycleNumberYearAndSection( int $cycleNumber, int $year, SectionInterface $section ): ?Distribution { $query = $this->createQuery(); $query->filterByCycleNumber($cycleNumber); $query->filterByYear($year); $query->filterBySection($section); return $query->findOne(); } }