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\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é <julien.fastre@champs-libres.coop>
* 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;