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

@@ -15,9 +15,7 @@ use Chill\MainBundle\Pagination\PaginatorInterface;
class Collection
{
public function __construct(private $items, private readonly PaginatorInterface $paginator)
{
}
public function __construct(private $items, private readonly PaginatorInterface $paginator) {}
public function getItems()
{

View File

@@ -15,9 +15,7 @@ use JsonSerializable;
class Counter implements JsonSerializable
{
public function __construct(private ?int $counter)
{
}
public function __construct(private ?int $counter) {}
public function getCounter(): ?int
{

View File

@@ -48,9 +48,7 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw
'confidential',
];
public function __construct(private readonly AddressRender $addressRender)
{
}
public function __construct(private readonly AddressRender $addressRender) {}
/**
* @param Address $address

View File

@@ -22,9 +22,7 @@ use function array_key_exists;
class CenterNormalizer implements DenormalizerInterface, NormalizerInterface
{
public function __construct(private readonly CenterRepository $repository)
{
}
public function __construct(private readonly CenterRepository $repository) {}
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@@ -25,9 +25,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
{
use NormalizerAwareTrait;
public function __construct(private readonly UserRepository $userRepository)
{
}
public function __construct(private readonly UserRepository $userRepository) {}
/**
* @param CommentEmbeddable $object

View File

@@ -26,9 +26,7 @@ use function is_array;
class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInterface
{
public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag)
{
}
public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag) {}
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@@ -23,9 +23,7 @@ use function is_array;
class DoctrineExistingEntityNormalizer implements DenormalizerInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly ClassMetadataFactoryInterface $serializerMetadataFactory)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly ClassMetadataFactoryInterface $serializerMetadataFactory) {}
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@@ -23,9 +23,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
{
use NormalizerAwareTrait;
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry) {}
/**
* @param EntityWorkflow $object

View File

@@ -21,9 +21,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz
{
use NormalizerAwareTrait;
public function __construct(private readonly MetadataExtractor $metadataExtractor)
{
}
public function __construct(private readonly MetadataExtractor $metadataExtractor) {}
/**
* @param EntityWorkflowStep $object

View File

@@ -24,9 +24,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte
{
use NormalizerAwareTrait;
public function __construct(private readonly NotificationHandlerManager $notificationHandlerManager, private readonly EntityManagerInterface $entityManager, private readonly Security $security)
{
}
public function __construct(private readonly NotificationHandlerManager $notificationHandlerManager, private readonly EntityManagerInterface $entityManager, private readonly Security $security) {}
/**
* @param Notification $object

View File

@@ -18,9 +18,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, DenormalizerInterface
{
public function __construct(private readonly Security $security)
{
}
public function __construct(private readonly Security $security) {}
public function denormalize($data, string $type, ?string $format = null, array $context = []): PrivateCommentEmbeddable
{

View File

@@ -36,9 +36,7 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware
'email' => '',
];
public function __construct(private readonly UserRender $userRender)
{
}
public function __construct(private readonly UserRender $userRender) {}
public function normalize($object, $format = null, array $context = [])
{