fixes after merge of master into upgrade-sf4

This commit is contained in:
2024-02-12 22:31:16 +01:00
parent 37af488f69
commit f889d67e94
664 changed files with 795 additions and 1980 deletions

View File

@@ -24,9 +24,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
final readonly class NotificationByUserCounter implements NotificationCounterInterface
{
public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository)
{
}
public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository) {}
public function addNotification(UserInterface $u): int
{

View File

@@ -24,9 +24,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class NotificationMailer
{
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator)
{
}
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {}
public function postPersistComment(NotificationComment $comment, PostPersistEventArgs $eventArgs): void
{

View File

@@ -18,9 +18,7 @@ use Symfony\Component\HttpKernel\Event\TerminateEvent;
class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister) {}
public static function getSubscribedEvents()
{

View File

@@ -11,6 +11,4 @@ declare(strict_types=1);
namespace Chill\MainBundle\Notification\Exception;
class NotificationHandlerNotFound extends \RuntimeException
{
}
class NotificationHandlerNotFound extends \RuntimeException {}

View File

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

View File

@@ -17,9 +17,7 @@ use Doctrine\ORM\EntityManagerInterface;
final readonly class NotificationHandlerManager
{
public function __construct(private iterable $handlers, private EntityManagerInterface $em)
{
}
public function __construct(private iterable $handlers, private EntityManagerInterface $em) {}
/**
* @throw NotificationHandlerNotFound if handler is not found

View File

@@ -23,9 +23,7 @@ class NotificationPresence
{
private array $cache = [];
public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository)
{
}
public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository) {}
/**
* @param list<array{relatedEntityClass: class-string, relatedEntityId: int}> $more

View File

@@ -21,9 +21,7 @@ use Twig\Extension\RuntimeExtensionInterface;
class NotificationTwigExtensionRuntime implements RuntimeExtensionInterface
{
public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator)
{
}
public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator) {}
public function counterNotificationFor(Environment $environment, string $relatedEntityClass, int $relatedEntityId, array $more = [], array $options = []): string
{