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

@@ -19,9 +19,7 @@ use Symfony\Component\Security\Core\Security;
final class PrivateCommentDataMapper extends AbstractType implements DataMapperInterface
{
public function __construct(private readonly Security $security)
{
}
public function __construct(private readonly Security $security) {}
public function mapDataToForms($viewData, $forms)
{

View File

@@ -16,9 +16,7 @@ use Symfony\Component\Form\DataMapperInterface;
class ScopePickerDataMapper implements DataMapperInterface
{
public function __construct(private readonly ?Scope $scope = null)
{
}
public function __construct(private readonly ?Scope $scope = null) {}
public function mapDataToForms($data, $forms)
{

View File

@@ -17,9 +17,7 @@ class CustomizeFormEvent extends \Symfony\Contracts\EventDispatcher\Event
{
final public const NAME = 'chill_main.customize_form';
public function __construct(protected string $type, protected FormBuilderInterface $builder)
{
}
public function __construct(protected string $type, protected FormBuilderInterface $builder) {}
public function getBuilder(): FormBuilderInterface
{

View File

@@ -24,9 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
final class LocationFormType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -17,9 +17,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
final readonly class AddressToIdDataTransformer implements DataTransformerInterface
{
public function __construct(private AddressRepository $addressRepository)
{
}
public function __construct(private AddressRepository $addressRepository) {}
public function reverseTransform($value)
{

View File

@@ -23,9 +23,7 @@ use function count;
class CenterTransformer implements DataTransformerInterface
{
public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false)
{
}
public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false) {}
public function reverseTransform($id)
{

View File

@@ -25,9 +25,7 @@ use function array_key_exists;
class EntityToJsonTransformer implements DataTransformerInterface
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type)
{
}
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type) {}
public function reverseTransform($value)
{

View File

@@ -17,9 +17,7 @@ use Symfony\Component\Form\DataTransformerInterface;
class MultipleObjectsToIdTransformer implements DataTransformerInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {}
/**
* Transforms a string (id) to an object (item).

View File

@@ -17,9 +17,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
class ObjectToIdTransformer implements DataTransformerInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {}
/**
* Transforms a string (id) to an object.

View File

@@ -20,9 +20,7 @@ use function is_int;
class PostalCodeToIdTransformer implements DataTransformerInterface
{
public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository)
{
}
public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository) {}
public function reverseTransform($value)
{

View File

@@ -18,9 +18,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
class ScopeTransformer implements DataTransformerInterface
{
public function __construct(private readonly EntityManagerInterface $em)
{
}
public function __construct(private readonly EntityManagerInterface $em) {}
public function reverseTransform($id)
{

View File

@@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class AggregatorType extends AbstractType
{
public function __construct()
{
}
public function __construct() {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -21,9 +21,7 @@ class FilterType extends AbstractType
{
final public const ENABLED_FIELD = 'enabled';
public function __construct()
{
}
public function __construct() {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -38,8 +38,7 @@ final class PickCenterType extends AbstractType
private readonly ExportManager $exportManager,
private readonly RegroupmentRepository $regroupmentRepository,
private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper
) {
}
) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -43,9 +43,7 @@ use function uniqid;
*/
final class PickAddressType extends AbstractType
{
public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator)
{
}
public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -38,9 +38,7 @@ use function count;
*/
class PickCenterType extends AbstractType
{
public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository)
{
}
public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository) {}
/**
* add a data transformer if user can reach only one center.

View File

@@ -21,9 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickCivilityType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function configureOptions(OptionsResolver $resolver)
{

View File

@@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickLocationTypeType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
public function configureOptions(OptionsResolver $resolver)
{

View File

@@ -21,9 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickPostalCodeType extends AbstractType
{
public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer)
{
}
public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -27,9 +27,7 @@ use Symfony\Component\Serializer\SerializerInterface;
*/
class PickUserDynamicType extends AbstractType
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer)
{
}
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickUserLocationType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository)
{
}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository) {}
public function configureOptions(OptionsResolver $resolver)
{

View File

@@ -24,9 +24,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
class PrivateCommentType extends AbstractType
{
public function __construct(protected PrivateCommentDataMapper $dataMapper)
{
}
public function __construct(protected PrivateCommentDataMapper $dataMapper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -42,9 +42,7 @@ use function count;
*/
class ScopePickerType extends AbstractType
{
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -29,9 +29,7 @@ use const SORT_STRING;
*/
class Select2CountryType extends AbstractType
{
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
{
}
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -29,9 +29,7 @@ use const SORT_STRING;
*/
class Select2LanguageType extends AbstractType
{
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
{
}
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -35,9 +35,7 @@ use Symfony\Component\Validator\Constraints\Regex;
class UserType extends AbstractType
{
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
{
}
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -36,9 +36,7 @@ use function array_key_exists;
class WorkflowStepType extends AbstractType
{
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{