Completed
Push — master ( 0909d2...ad2dca )
by Arnaud
27s queued 11s
created
src/Configuration/ApplicationConfiguration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             ->setAllowedTypes('routing_url_pattern', 'string')
90 90
             ->setAllowedTypes('page_parameter', 'string')
91 91
             ->setAllowedTypes('menus', ['array', 'null'])
92
-            ->setNormalizer('routing_name_pattern', function (Options $options, $value) {
92
+            ->setNormalizer('routing_name_pattern', function(Options $options, $value) {
93 93
                 if (false === strstr($value, '{admin}')) {
94 94
                     throw new InvalidOptionsException('Admin routing configuration pattern name should contains the {admin} placeholder');
95 95
                 }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
                 return $value;
101 101
             })
102
-            ->setNormalizer('routing_url_pattern', function (Options $options, $value) {
102
+            ->setNormalizer('routing_url_pattern', function(Options $options, $value) {
103 103
                 if (false === strstr($value, '{admin}')) {
104 104
                     throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder');
105 105
                 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
         $resolver->setDefault('fields_mapping', $defaultMapping);
139 139
         $resolver->setAllowedTypes('fields_mapping', 'array');
140
-        $resolver->setNormalizer('fields_mapping', function (Options $options, $value) use ($defaultMapping) {
140
+        $resolver->setNormalizer('fields_mapping', function(Options $options, $value) use ($defaultMapping) {
141 141
             // Merge with default mapping to allow override
142 142
             $value = array_merge($defaultMapping, $value);
143 143
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
         $resolver->setDefault('fields_template_mapping', $defaultMapping);
153 153
         $resolver->setAllowedTypes('fields_template_mapping', 'array');
154
-        $resolver->setNormalizer('fields_template_mapping', function (Options $options, $value) use ($defaultMapping) {
154
+        $resolver->setNormalizer('fields_template_mapping', function(Options $options, $value) use ($defaultMapping) {
155 155
             // Merge with default mapping to allow override
156 156
             $value = array_merge($defaultMapping, $value);
157 157
 
Please login to merge, or discard this patch.
src/Configuration/MenuConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
                 'inherits' => true,
47 47
             ])
48 48
             ->setAllowedTypes('inherits', 'boolean')
49
-            ->setNormalizer('children', function (Options $options, $value) {
49
+            ->setNormalizer('children', function(Options $options, $value) {
50 50
                 if (!is_array($value)) {
51 51
                     $value = [];
52 52
                 }
Please login to merge, or discard this patch.
src/Configuration/MenuItemConfiguration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 //'allow_safe_labels' => true,
67 67
                 'extras' => ['safe_label' => true],
68 68
             ])
69
-            ->setNormalizer('route', function (Options $options, $route) {
69
+            ->setNormalizer('route', function(Options $options, $route) {
70 70
                 if ($options->offsetGet('uri')) {
71 71
                     return $route;
72 72
                 }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                 return $route;
79 79
             })
80
-            ->setNormalizer('admin', function (Options $options, $adminName) {
80
+            ->setNormalizer('admin', function(Options $options, $adminName) {
81 81
                 // user has to defined either an admin name and an action name, or a route name with optional
82 82
                 // parameters, or an url
83 83
                 if (null === $adminName
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 return $adminName;
91 91
             })
92 92
             // if an admin name is set, an action name can provided. This action will be the menu link
93
-            ->setNormalizer('action', function (Options $options, $action) {
93
+            ->setNormalizer('action', function(Options $options, $action) {
94 94
                 // if an action name is provided, an admin name should be defined too
95 95
                 if (null !== $action && null === $options->offsetGet('admin')) {
96 96
                     throw new InvalidOptionsException('You should provide an admin name for this action '.$action);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
                 return $action;
105 105
             })
106
-            ->setNormalizer('children', function (Options $options, $items) {
106
+            ->setNormalizer('children', function(Options $options, $items) {
107 107
                 if (!is_array($items)) {
108 108
                     $items = [];
109 109
                 }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
                 return $resolvedItems;
123 123
             })
124
-            ->setNormalizer('text', function (Options $options, $text) {
124
+            ->setNormalizer('text', function(Options $options, $text) {
125 125
                 if ($text) {
126 126
                     return $text;
127 127
                 }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
                 return $text;
144 144
             })
145
-            ->setNormalizer('linkAttributes', function (Options $options, $linkAttributes) {
145
+            ->setNormalizer('linkAttributes', function(Options $options, $linkAttributes) {
146 146
                 if (!$linkAttributes) {
147 147
                     $linkAttributes = [];
148 148
                 }
Please login to merge, or discard this patch.
src/Configuration/ActionConfiguration.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     protected function getFieldsNormalizer()
139 139
     {
140
-        return function (Options $options, $fields) {
140
+        return function(Options $options, $fields) {
141 141
             $normalizedFields = [];
142 142
 
143 143
             foreach ($fields as $name => $field) {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     protected function getOrderNormalizer()
161 161
     {
162
-        return function (Options $options, $order) {
162
+        return function(Options $options, $order) {
163 163
             foreach ($order as $field => $sort) {
164 164
                 if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
165 165
                     throw new Exception('Order value should be an array of string (["field" => $key]), got '.gettype($sort));
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     protected function getLoadStrategyNormalizer()
180 180
     {
181
-        return function (Options $options, $value) {
181
+        return function(Options $options, $value) {
182 182
             if (!$value) {
183 183
                 if ('create' == $this->actionName) {
184 184
                     $value = LAGAdminBundle::LOAD_STRATEGY_NONE;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     protected function getCriteriaNormalizer()
203 203
     {
204
-        return function (Options $options, $value) {
204
+        return function(Options $options, $value) {
205 205
             if (!$value) {
206 206
                 $idActions = [
207 207
                     'edit',
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     protected function getFiltersNormalizer(): Closure
241 241
     {
242
-        return function (Options $options, $data) {
242
+        return function(Options $options, $data) {
243 243
             $normalizedData = [];
244 244
 
245 245
             foreach ($data as $name => $field) {
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
     protected function getFormNormalizer(): Closure
267 267
     {
268
-        return function (Options $options, $value) {
268
+        return function(Options $options, $value) {
269 269
             if (null !== $value) {
270 270
                 return $value;
271 271
             }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
     protected function getTitleNormalizer(): Closure
287 287
     {
288
-        return function (Options $options, $value) {
288
+        return function(Options $options, $value) {
289 289
             // If the translation system is not used, return the provided value as is
290 290
             if (!$this->adminConfiguration->isTranslationEnabled()) {
291 291
                 if (null === $value) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                 'menus' => [],
359 359
             ])
360 360
             ->setAllowedTypes('add_return', 'boolean')
361
-            ->setNormalizer('menus', function (Options $options, $value) {
361
+            ->setNormalizer('menus', function(Options $options, $value) {
362 362
                 if (false === $value) {
363 363
                     $value = [];
364 364
                 }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             ->setAllowedTypes('route_path', 'string')
410 410
             ->setAllowedTypes('route_defaults', 'array')
411 411
             ->setAllowedTypes('route_requirements', 'array')
412
-            ->setNormalizer('route_defaults', function (Options $options, $value) {
412
+            ->setNormalizer('route_defaults', function(Options $options, $value) {
413 413
                 if (!$value || is_array($value)) {
414 414
                     $value = [];
415 415
                 }
Please login to merge, or discard this patch.