Passed
Push — master ( bb67c8...cd2c1d )
by Arnaud
14:35 queued 11:07
created
src/Form/Type/Select2/Select2EntityType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Form/Type/TinyMce/TinyMceType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 'tinymce_options' => [],
26 26
             ])
27 27
             ->setAllowedTypes('tinymce_options', 'array')
28
-            ->setNormalizer('tinymce_options', function (Options $options, $value) {
28
+            ->setNormalizer('tinymce_options', function(Options $options, $value) {
29 29
                 $attr = $options->offsetGet('attr');
30 30
 
31 31
                 if (\array_key_exists('id', $attr)) {
Please login to merge, or discard this patch.
src/Field/CountField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function getDataTransformer(): ?Closure
20 20
     {
21
-        return function ($data) {
21
+        return function($data) {
22 22
             return is_countable($data) ? \count($data) : 0;
23 23
         };
24 24
     }
Please login to merge, or discard this patch.
src/Field/AutoField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
     public function getDataTransformer(): ?Closure
24 24
     {
25
-        return function ($data) {
25
+        return function($data) {
26 26
             if ($data === null) {
27 27
                 return '';
28 28
             }
Please login to merge, or discard this patch.
src/Field/ActionCollectionField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
                 'template' => '@LAGAdmin/fields/action-collection.html.twig',
20 20
                 'actions' => [],
21 21
             ])
22
-            ->setNormalizer('actions', function (Options $options, $value) {
22
+            ->setNormalizer('actions', function(Options $options, $value) {
23 23
                 if (!\is_array($value) || 0 === \count($value)) {
24 24
                     $value = [
25 25
                         'edit' => [],
Please login to merge, or discard this patch.
src/Field/LinkField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                 'title' => null,
35 35
                 'url' => '',
36 36
             ])
37
-            ->setNormalizer('route', function (Options $options, $value) use ($appConfig) {
37
+            ->setNormalizer('route', function(Options $options, $value) use ($appConfig) {
38 38
                 // A route, an url or an admin should be defined
39 39
                 if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) {
40 40
                     throw new InvalidOptionsException('Either an url or a route should be defined');
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
                 return $value;
48 48
             })
49
-            ->setNormalizer('admin', function (Options $options, $value) {
49
+            ->setNormalizer('admin', function(Options $options, $value) {
50 50
                 // if a Admin is defined, an Action should be defined too
51 51
                 if ($value && !$options->offsetGet('action')) {
52 52
                     throw new InvalidOptionsException('An Action should be provided if an Admin is provided');
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
                 return $value;
56 56
             })
57
-            ->setNormalizer('text', function (Options $options, $value) {
57
+            ->setNormalizer('text', function(Options $options, $value) {
58 58
                 if ($value) {
59 59
                     return $value;
60 60
                 }
Please login to merge, or discard this patch.
src/Field/ActionField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
                 'template' => '@LAGAdmin/fields/action.html.twig',
23 23
                 'translation' => true,
24 24
             ])
25
-            ->setNormalizer('attr', function (Options $options, $value) {
25
+            ->setNormalizer('attr', function(Options $options, $value) {
26 26
                 if (!empty($value['class'])) {
27 27
                     return $value;
28 28
                 }
Please login to merge, or discard this patch.
src/Factory/FieldFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,28 +108,28 @@
 block discarded – undo
108 108
             ->setAllowedTypes('translation', ['boolean'])
109 109
             ->setAllowedTypes('translation_domain', ['string', 'null'])
110 110
             ->setAllowedTypes('sortable', ['boolean'])
111
-            ->setNormalizer('attr', function (Options $options, $attr) {
111
+            ->setNormalizer('attr', function(Options $options, $attr) {
112 112
                 if ($attr === null) {
113 113
                     $attr = [];
114 114
                 }
115 115
 
116 116
                 return $attr;
117 117
             })
118
-            ->setNormalizer('header_attr', function (Options $options, $attr) {
118
+            ->setNormalizer('header_attr', function(Options $options, $attr) {
119 119
                 if ($attr === null) {
120 120
                     $attr = [];
121 121
                 }
122 122
 
123 123
                 return $attr;
124 124
             })
125
-            ->setNormalizer('mapped', function (Options $options, $mapped) use ($field) {
125
+            ->setNormalizer('mapped', function(Options $options, $mapped) use ($field) {
126 126
                 if (u($field->getName())->startsWith('_')) {
127 127
                     return true;
128 128
                 }
129 129
 
130 130
                 return $mapped;
131 131
             })
132
-            ->setNormalizer('property_path', function (Options $options, $propertyPath) use ($field) {
132
+            ->setNormalizer('property_path', function(Options $options, $propertyPath) use ($field) {
133 133
                 if (u($field->getName())->startsWith('_')) {
134 134
                     return null;
135 135
                 }
Please login to merge, or discard this patch.
src/Configuration/AdminConfiguration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             ->setDefault('menus', [])
81 81
             ->setAllowedTypes('menus', 'array')
82 82
 
83
-            ->setDefault('translation', function (OptionsResolver $translationResolver) {
83
+            ->setDefault('translation', function(OptionsResolver $translationResolver) {
84 84
                 $translationResolver
85 85
                     ->setDefault('enabled', true)
86 86
                     ->setAllowedTypes('enabled', 'boolean')
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
     private function getActionNormalizer(): Closure
258 258
     {
259
-        return function (Options $options, $actions) {
259
+        return function(Options $options, $actions) {
260 260
             $normalizedActions = [];
261 261
 //            $addBatchAction = false;
262 262
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
     private function getRoutesPatternNormalizer(): Closure
293 293
     {
294
-        return function (Options $options, $value) {
294
+        return function(Options $options, $value) {
295 295
             if (!u($value)->containsAny('{action}')) {
296 296
                 throw new InvalidOptionsException(sprintf('The "%s" parameters in admin "%s" should contains the "%s" parameters', 'routes_pattern', $options->offsetGet('name'), '{action}'));
297 297
             }
Please login to merge, or discard this patch.