apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Routing\RouteCollection;
*/
class ChillRoutesLoader extends Loader
{
public function __construct(private array $routes)
public function __construct(private readonly array $routes)
{
parent::__construct();
}

View File

@@ -22,7 +22,6 @@ interface LocalMenuBuilderInterface
{
/**
* @param $menuId
* @param MenuItem $menu
* @param TParams $parameters
*/
public function buildMenu($menuId, MenuItem $menu, array $parameters);

View File

@@ -22,7 +22,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private NotificationByUserCounter $notificationByUserCounter, private WorkflowByUserCounter $workflowByUserCounter, private Security $security, private TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private RequestStack $requestStack)
public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack)
{
}

View File

@@ -33,7 +33,7 @@ class MenuComposer
private RouteCollection $routeCollection;
public function __construct(private RouterInterface $router, private FactoryInterface $menuFactory, private TranslatorInterface $translator)
public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator)
{
}

View File

@@ -38,7 +38,7 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface
'activeRouteKey' => null,
];
public function __construct(private MenuComposer $menuComposer)
public function __construct(private readonly MenuComposer $menuComposer)
{
}
@@ -76,7 +76,7 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface
{
return [new TwigFunction(
'chill_menu',
[$this, 'chillMenu'],
$this->chillMenu(...),
[
'is_safe' => ['html'],
'needs_environment' => true,