new cs rule: single_line_empty_body

Rule is added to the last version of php-cs-fixer
This commit is contained in:
2023-09-12 15:58:59 +02:00
parent b9231a91a3
commit d2323e91ca
606 changed files with 639 additions and 1804 deletions

View File

@@ -25,9 +25,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

@@ -25,9 +25,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

@@ -19,9 +19,7 @@ use function count;
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

@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Notification\Exception;
use RuntimeException;
class NotificationHandlerNotFound extends RuntimeException
{
}
class NotificationHandlerNotFound extends RuntimeException {}

View File

@@ -40,9 +40,7 @@ class Mailer
* @param $routeParameters
* @param mixed[] $routeParameters
*/
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly \Twig\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 \Twig\Environment $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters) {}
/**
* @param $template

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

@@ -24,9 +24,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
{