Phpstan error for unused parameter fixed

This commit is contained in:
Julie Lenaerts 2024-04-24 10:49:19 +02:00
parent 511c0af5fa
commit d3390ca334
2 changed files with 6 additions and 18 deletions

View File

@ -34,9 +34,6 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/ */
class ListCSPerson extends ListPerson implements ListInterface, ExportElementValidatedInterface class ListCSPerson extends ListPerson implements ListInterface, ExportElementValidatedInterface
{ {
/**
* @var array
*/
public const CSPERSON = [ public const CSPERSON = [
'ressource__label' => CSPerson::RESSOURCES, 'ressource__label' => CSPerson::RESSOURCES,
'moyen_transport__label' => CSPerson::MOBILITE_MOYEN_TRANSPORT, 'moyen_transport__label' => CSPerson::MOBILITE_MOYEN_TRANSPORT,
@ -47,19 +44,11 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
'neet_eligibility__label' => CSPerson::NEET_ELIGIBILITY, 'neet_eligibility__label' => CSPerson::NEET_ELIGIBILITY,
]; ];
/** protected array $personIds = [];
* @var array protected EntityManagerInterface $em;
*/ protected TranslatorInterface $translator;
protected $personIds = []; protected TranslatableStringHelper $translatableStringHelper;
protected CustomFieldProvider $customFieldProvider;
/** EntityManagerInterface $em */
protected $em;
/** TranslatorInterface $translator */
protected $translator;
/** TranslatableStringHelper $translatableStringHelper */
protected $translatableStringHelper;
/** CustomFieldProvider $customFieldProvider */
protected $customFieldProvider;
public function __construct( public function __construct(
TranslatorInterface $translator, TranslatorInterface $translator,
@ -70,6 +59,7 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal
ParameterBagInterface $parameterBag ParameterBagInterface $parameterBag
) { ) {
parent::__construct($customFieldProvider, $listPersonHelper, $em, $translatableStringHelper, $parameterBag); parent::__construct($customFieldProvider, $listPersonHelper, $em, $translatableStringHelper, $parameterBag);
$this->translator = $translator;
} }
/** /**

View File

@ -23,10 +23,8 @@ use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Export\Declarations;
use Chill\PersonBundle\Export\Helper\ListPersonHelper; use Chill\PersonBundle\Export\Helper\ListPersonHelper;
use Chill\PersonBundle\Security\Authorization\PersonVoter; use Chill\PersonBundle\Security\Authorization\PersonVoter;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use PhpOffice\PhpSpreadsheet\Shared\Date;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;