DX: remove unused property on PersonController

This commit is contained in:
Julien Fastré 2023-07-28 13:05:29 +02:00
parent a0d4a995d3
commit 7f96a895e1
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 11 additions and 12 deletions

View File

@ -49,15 +49,11 @@ final class PersonController extends AbstractController
{ {
public function __construct( public function __construct(
private readonly AuthorizationHelperInterface $authorizationHelper, private readonly AuthorizationHelperInterface $authorizationHelper,
protected SimilarPersonMatcher $similarPersonMatcher, private readonly SimilarPersonMatcher $similarPersonMatcher,
protected TranslatorInterface $translator, private readonly TranslatorInterface $translator,
protected EventDispatcherInterface $eventDispatcher, private readonly EventDispatcherInterface $eventDispatcher,
/** private readonly PersonRepository $personRepository,
* @var PersonRepository; private readonly ConfigPersonAltNamesHelper $configPersonAltNameHelper,
*/
protected PersonRepository $personRepository,
protected ConfigPersonAltNamesHelper $configPersonAltNameHelper,
private readonly LoggerInterface $logger,
private readonly ValidatorInterface $validator, private readonly ValidatorInterface $validator,
private readonly EntityManagerInterface $em private readonly EntityManagerInterface $em
) { ) {
@ -256,7 +252,7 @@ final class PersonController extends AbstractController
); );
} }
public function viewAction($person_id) public function viewAction(int $person_id)
{ {
$person = $this->_getPerson($person_id); $person = $this->_getPerson($person_id);
@ -290,7 +286,7 @@ final class PersonController extends AbstractController
* *
* @return \Chill\PersonBundle\Entity\Person * @return \Chill\PersonBundle\Entity\Person
*/ */
private function _getPerson(mixed $id) private function _getPerson(int $id)
{ {
return $this->personRepository->find($id); return $this->personRepository->find($id);
} }

View File

@ -1,6 +1,9 @@
services: services:
Chill\PersonBundle\Controller\PersonController: _defaults:
autowire: true autowire: true
autoconfigure: true
Chill\PersonBundle\Controller\PersonController:
tags: ['controller.service_arguments'] tags: ['controller.service_arguments']
Chill\PersonBundle\Controller\TimelinePersonController: Chill\PersonBundle\Controller\TimelinePersonController: