*/ class DoctrineCountryRepository extends ServiceEntityRepository implements CountryRepositoryInterface { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Country::class); } public function findById(int $id): ?Country { return $this->find($id); } public function findAllOrdered(): array { return $this->createQueryBuilder('c') ->orderBy('c.position', 'ASC') ->addOrderBy('c.name', 'ASC') ->getQuery() ->getResult() ; } }