apply rector ruleset "symfony constructor injection"

This commit is contained in:
2025-11-03 16:22:02 +01:00
parent adab2ffe63
commit 7654db4e39
124 changed files with 183 additions and 171 deletions

View File

@@ -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