fix type-hinting for person repository

This commit is contained in:
Julien Fastré 2021-05-31 21:09:14 +02:00
parent 562c72f7bb
commit c269bfe278

View File

@ -21,31 +21,19 @@ namespace Chill\PersonBundle\Form\ChoiceLoader;
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface; use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
use Doctrine\ORM\EntityRepository;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Repository\PersonRepository;
/** /**
* Class PersonChoiceLoader * Allow to load a list of person
*
* @package Chill\PersonBundle\Form\ChoiceLoader
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/ */
class PersonChoiceLoader implements ChoiceLoaderInterface class PersonChoiceLoader implements ChoiceLoaderInterface
{ {
/** protected PersonRepository $personRepository;
* @var EntityRepository
*/
protected $personRepository;
/** protected array $lazyLoadedPersons = [];
* @var array
*/
protected $lazyLoadedPersons = [];
/** protected array $centers = [];
* @var array
*/
protected $centers = [];
/** /**
* PersonChoiceLoader constructor. * PersonChoiceLoader constructor.
@ -54,7 +42,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
* @param array|null $centers * @param array|null $centers
*/ */
public function __construct( public function __construct(
EntityRepository $personRepository, PersonRepository $personRepository,
array $centers = null array $centers = null
) { ) {
$this->personRepository = $personRepository; $this->personRepository = $personRepository;