| @@ -40,14 +40,14 @@ discard block | ||
| 40 | 40 |              ->setAllowedTypes('allow_add', 'boolean') | 
| 41 | 41 |              ->setAllowedTypes('create_property_path', ['string', 'null']) | 
| 42 | 42 |              ->setAllowedTypes('select2_options', 'array') | 
| 43 | -            ->setNormalizer('create_property_path', function (Options $options, $value) { | |
| 43 | +            ->setNormalizer('create_property_path', function(Options $options, $value) { | |
| 44 | 44 |                  if ($options->offsetGet('allow_add') && !$value) { | 
| 45 | 45 |                      throw new InvalidOptionsException('The options "create_property_path" should be defined when "allow_add" is set to true'); | 
| 46 | 46 | } | 
| 47 | 47 | |
| 48 | 48 | return $value; | 
| 49 | 49 | }) | 
| 50 | -            ->setNormalizer('select2_options', function (Options $options, $value) { | |
| 50 | +            ->setNormalizer('select2_options', function(Options $options, $value) { | |
| 51 | 51 |                  if ($options->offsetGet('allow_add')) { | 
| 52 | 52 | $value['tags'] = json_encode(true); | 
| 53 | 53 | } | 
| @@ -60,7 +60,7 @@ discard block | ||
| 60 | 60 | public function buildForm(FormBuilderInterface $builder, array $options) | 
| 61 | 61 |      { | 
| 62 | 62 | $builder | 
| 63 | -            ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { | |
| 63 | +            ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($options) { | |
| 64 | 64 | $manager = $this->registry->getManagerForClass($options['class']); | 
| 65 | 65 | $repository = $manager->getRepository($options['class']); | 
| 66 | 66 | $propertyAccessor = PropertyAccess::createPropertyAccessor(); | 
| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 |              ->setAllowedTypes('translation', ['boolean']) | 
| 50 | 50 |              ->setAllowedTypes('translation_domain', ['string', 'null']) | 
| 51 | 51 |              ->setAllowedTypes('sortable', ['boolean']) | 
| 52 | -            ->addNormalizer('attr', function (Options $options, $value) { | |
| 52 | +            ->addNormalizer('attr', function(Options $options, $value) { | |
| 53 | 53 |                  if ($value === null) { | 
| 54 | 54 | $value = []; | 
| 55 | 55 | } | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | |
| 63 | 63 | return $value; | 
| 64 | 64 | }) | 
| 65 | -            ->addNormalizer('header_attr', function (Options $options, $value) { | |
| 65 | +            ->addNormalizer('header_attr', function(Options $options, $value) { | |
| 66 | 66 |                  if ($value === null) { | 
| 67 | 67 | $value = []; | 
| 68 | 68 | } | 
| @@ -75,14 +75,14 @@ discard block | ||
| 75 | 75 | |
| 76 | 76 | return $value; | 
| 77 | 77 | }) | 
| 78 | -            ->setNormalizer('mapped', function (Options $options, $mapped) { | |
| 78 | +            ->setNormalizer('mapped', function(Options $options, $mapped) { | |
| 79 | 79 |                  if (u($this->getName())->startsWith('_')) { | 
| 80 | 80 | return true; | 
| 81 | 81 | } | 
| 82 | 82 | |
| 83 | 83 | return $mapped; | 
| 84 | 84 | }) | 
| 85 | -            ->setNormalizer('property_path', function (Options $options, $propertyPath) { | |
| 85 | +            ->setNormalizer('property_path', function(Options $options, $propertyPath) { | |
| 86 | 86 |                  if (u($this->getName())->startsWith('_')) { | 
| 87 | 87 | return null; | 
| 88 | 88 | } | 
| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | 'custom_buttons' => [], | 
| 29 | 29 | ]) | 
| 30 | 30 |              ->setAllowedTypes('tinymce_options', 'array') | 
| 31 | -            ->addNormalizer('tinymce_options', function (Options $options, $value) { | |
| 31 | +            ->addNormalizer('tinymce_options', function(Options $options, $value) { | |
| 32 | 32 |                  $attr = $options->offsetGet('attr'); | 
| 33 | 33 | |
| 34 | 34 |                  if (\array_key_exists('id', $attr)) { | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | return array_replace_recursive($this->getTinyMceDefaultConfiguration(), $value); | 
| 42 | 42 | }) | 
| 43 | 43 |              ->setAllowedTypes('custom_buttons', 'array') | 
| 44 | -            ->addNormalizer('custom_buttons', function (Options $options, $value) { | |
| 44 | +            ->addNormalizer('custom_buttons', function(Options $options, $value) { | |
| 45 | 45 |                  foreach ($value as $item => $button) { | 
| 46 | 46 | $buttonResolver = new OptionsResolver(); | 
| 47 | 47 | $buttonResolver->setDefaults([ | 
| @@ -25,7 +25,7 @@ | ||
| 25 | 25 | 'translation' => true, | 
| 26 | 26 | 'property_path' => null, | 
| 27 | 27 | ]) | 
| 28 | -            ->addNormalizer('attr', function (Options $options, $value) { | |
| 28 | +            ->addNormalizer('attr', function(Options $options, $value) { | |
| 29 | 29 |                  if (!empty($value['class'])) { | 
| 30 | 30 | return $value; | 
| 31 | 31 | } | 
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | ->container | 
| 23 | 23 | ->expects($this->atLeastOnce()) | 
| 24 | 24 |              ->method('setParameter') | 
| 25 | -            ->willReturnCallback(function ($parameter, $value) { | |
| 25 | +            ->willReturnCallback(function($parameter, $value) { | |
| 26 | 26 | $this->assertContains($parameter, [ | 
| 27 | 27 | 'lag_admin.application.configuration', | 
| 28 | 28 | 'lag_admin.resource_paths', | 
| @@ -15,19 +15,19 @@ | ||
| 15 | 15 | public function __construct( | 
| 16 | 16 | #[Assert\NotBlank(message: 'The operation name should not be empty')] | 
| 17 | 17 | private ?string $name = null, | 
| 18 | - #[Assert\NotBlank(message: 'The resource name should not be empty')] | |
| 18 | + #[Assert\NotBlank(message : 'The resource name should not be empty')] | |
| 19 | 19 | private ?string $resourceName = null, | 
| 20 | - #[Assert\Length(max: 255, maxMessage: 'The operation title should be shorter than 255 characters')] | |
| 20 | + #[Assert\Length(max : 255, maxMessage : 'The operation title should be shorter than 255 characters')] | |
| 21 | 21 | private ?string $title = null, | 
| 22 | 22 | private ?string $description = null, | 
| 23 | - #[Assert\Length(max: 255, maxMessage: 'The operation icon should be shorter than 255 characters')] | |
| 23 | + #[Assert\Length(max : 255, maxMessage : 'The operation icon should be shorter than 255 characters')] | |
| 24 | 24 | private ?string $icon = null, | 
| 25 | - #[Assert\NotBlank(message: 'The operation template should not be empty')] | |
| 25 | + #[Assert\NotBlank(message : 'The operation template should not be empty')] | |
| 26 | 26 | private ?string $template = null, | 
| 27 | 27 | private ?array $permissions = [], | 
| 28 | - #[Assert\NotBlank(message: 'The operation controller should not be empty')] | |
| 28 | + #[Assert\NotBlank(message : 'The operation controller should not be empty')] | |
| 29 | 29 | private ?string $controller = null, | 
| 30 | - #[Assert\NotBlank(message: 'The operation has an empty route')] | |
| 30 | + #[Assert\NotBlank(message : 'The operation has an empty route')] | |
| 31 | 31 | private ?string $route = null, | 
| 32 | 32 | private ?array $routeParameters = null, | 
| 33 | 33 | private array $methods = [], | 
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 |  { | 
| 16 | 16 | public function buildForm(FormBuilderInterface $builder, array $options) | 
| 17 | 17 |      { | 
| 18 | -        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) { | |
| 18 | +        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) { | |
| 19 | 19 | $data = $event->getData(); | 
| 20 | 20 | $form = $event->getForm(); | 
| 21 | 21 | $accessor = PropertyAccess::createPropertyAccessor(); | 
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 |  { | 
| 17 | 17 | public function buildForm(FormBuilderInterface $builder, array $options): void | 
| 18 | 18 |      { | 
| 19 | -        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) { | |
| 19 | +        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) { | |
| 20 | 20 | $form = $event->getForm(); | 
| 21 | 21 | |
| 22 | 22 | /** @var FilterInterface $filter */ | 
| @@ -19,7 +19,7 @@ | ||
| 19 | 19 | |
| 20 | 20 | public function getDataTransformer(): ?\Closure | 
| 21 | 21 |      { | 
| 22 | -        return function ($data) { | |
| 22 | +        return function($data) { | |
| 23 | 23 | return is_countable($data) ? \count($data) : 0; | 
| 24 | 24 | }; | 
| 25 | 25 | } |