mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-26 05:38:29 +00:00
apply rector ruleset "symfony constructor injection"
This commit is contained in:
@@ -15,7 +15,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class example 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\MainBundle\Pagination\PaginatorFactoryInterface $paginatorFactory)
|
||||
{
|
||||
}
|
||||
public function yourAction(): \Symfony\Component\HttpFoundation\Response
|
||||
@@ -27,7 +27,7 @@ class example extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractControl
|
||||
->getSingleScalarResult();
|
||||
|
||||
// get the PaginatorFactory
|
||||
$paginatorFactory = $this->get('chill_main.paginator_factory');
|
||||
$paginatorFactory = $this->paginatorFactory;
|
||||
|
||||
// create a pagination instance. This instance is only valid for
|
||||
// the current route and parameters
|
||||
|
||||
Reference in New Issue
Block a user