From c269bfe27863b984eb5c66f43bec4157fecbd2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 31 May 2021 21:09:14 +0200 Subject: [PATCH] fix type-hinting for person repository --- .../Form/ChoiceLoader/PersonChoiceLoader.php | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php index b1cdfee7a..db1d5c6f8 100644 --- a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php +++ b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php @@ -21,31 +21,19 @@ namespace Chill\PersonBundle\Form\ChoiceLoader; use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface; -use Doctrine\ORM\EntityRepository; use Chill\PersonBundle\Entity\Person; +use Chill\PersonBundle\Repository\PersonRepository; /** - * Class PersonChoiceLoader - * - * @package Chill\PersonBundle\Form\ChoiceLoader - * @author Julien Fastré + * Allow to load a list of person */ class PersonChoiceLoader implements ChoiceLoaderInterface { - /** - * @var EntityRepository - */ - protected $personRepository; + protected PersonRepository $personRepository; - /** - * @var array - */ - protected $lazyLoadedPersons = []; + protected array $lazyLoadedPersons = []; - /** - * @var array - */ - protected $centers = []; + protected array $centers = []; /** * PersonChoiceLoader constructor. @@ -54,7 +42,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface * @param array|null $centers */ public function __construct( - EntityRepository $personRepository, + PersonRepository $personRepository, array $centers = null ) { $this->personRepository = $personRepository;