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

@@ -23,7 +23,7 @@ use Doctrine\ORM\Event\PreFlushEventArgs;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Security\Core\User\UserInterface;
final class NotificationByUserCounter implements NotificationCounterInterface
final readonly class NotificationByUserCounter implements NotificationCounterInterface
{
public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository)
{

View File

@@ -25,7 +25,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class NotificationMailer
{
public function __construct(private MailerInterface $mailer, private LoggerInterface $logger, private TranslatorInterface $translator)
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator)
{
}

View File

@@ -19,7 +19,7 @@ use function count;
class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberInterface
{
public function __construct(private EntityManagerInterface $em, private NotificationPersisterInterface $persister)
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister)
{
}

View File

@@ -40,7 +40,7 @@ class Mailer
* @param $routeParameters
* @param mixed[] $routeParameters
*/
public function __construct(private MailerInterface $mailer, private LoggerInterface $logger, private EngineInterface $twig, private RouterInterface $router, private TranslatorInterface $translator, protected $routeParameters)
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly EngineInterface $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters)
{
}

View File

@@ -15,7 +15,7 @@ use Chill\MainBundle\Entity\Notification;
use Chill\MainBundle\Notification\Exception\NotificationHandlerNotFound;
use Doctrine\ORM\EntityManagerInterface;
final class NotificationHandlerManager
final readonly class NotificationHandlerManager
{
public function __construct(private iterable $handlers, private EntityManagerInterface $em)
{

View File

@@ -24,7 +24,7 @@ class NotificationPresence
{
private array $cache = [];
public function __construct(private Security $security, private NotificationRepository $notificationRepository)
public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository)
{
}

View File

@@ -21,7 +21,7 @@ use Twig\Extension\RuntimeExtensionInterface;
class NotificationTwigExtensionRuntime implements RuntimeExtensionInterface
{
public function __construct(private FormFactoryInterface $formFactory, private NotificationPresence $notificationPresence, private UrlGeneratorInterface $urlGenerator)
public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator)
{
}