mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-25 21:28:33 +00:00
apply rector ruleset "symfony constructor injection"
This commit is contained in:
@@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
|
||||
{
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry)
|
||||
public function __construct(private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry, private readonly \Chill\PersonBundle\Repository\PersonRepository $personRepository)
|
||||
{
|
||||
}
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\
|
||||
public function listAction($id): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
||||
$person = $this->get('chill.person.repository.person')
|
||||
$person = $this->personRepository
|
||||
->find($id);
|
||||
|
||||
if (null === $person) {
|
||||
|
||||
Reference in New Issue
Block a user