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

@@ -22,9 +22,7 @@ use Symfony\Component\Workflow\Event\Event;
final readonly class WorkflowByUserCounter implements NotificationCounterInterface, EventSubscriberInterface
{
public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool)
{
}
public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool) {}
public function addNotification(UserInterface $u): int
{

View File

@@ -20,9 +20,7 @@ class EntityWorkflowManager
/**
* @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers
*/
public function __construct(private readonly iterable $handlers, private readonly Registry $registry)
{
}
public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {}
public function getHandler(EntityWorkflow $entityWorkflow, array $options = []): EntityWorkflowHandlerInterface
{

View File

@@ -25,9 +25,7 @@ use function array_key_exists;
class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterface
{
public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender)
{
}
public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender) {}
public function addDests(Event $event): void
{

View File

@@ -25,9 +25,7 @@ use function in_array;
class NotificationOnTransition implements EventSubscriberInterface
{
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry)
{
}
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry) {}
public static function getSubscribedEvents(): array
{

View File

@@ -21,9 +21,7 @@ use Symfony\Component\Workflow\Registry;
class SendAccessKeyEventSubscriber
{
public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer)
{
}
public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer) {}
public function postPersist(EntityWorkflowStep $step): void
{

View File

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

View File

@@ -20,9 +20,7 @@ use function array_key_exists;
class MetadataExtractor
{
public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Security;
class WorkflowNotificationHandler implements NotificationHandlerInterface
{
public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security)
{
}
public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security) {}
public function getTemplate(Notification $notification, array $options = []): string
{

View File

@@ -23,9 +23,7 @@ use Twig\Extension\RuntimeExtensionInterface;
class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface
{
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer) {}
public function getTransitionByString(EntityWorkflow $entityWorkflow, string $key): ?Transition
{

View File

@@ -22,9 +22,7 @@ use function count;
class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\ConstraintValidator
{
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager) {}
/**
* @param EntityWorkflow $value