Completed
Push — master ( dc160c...03751c )
by Arnaud
15s 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/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.
src/Configuration/MenuItemConfiguration.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 //'allow_safe_labels' => true,
81 81
                 'extras' => ['safe_label' => true],
82 82
             ])
83
-            ->setNormalizer('route', function (Options $options, $route) {
83
+            ->setNormalizer('route', function(Options $options, $route) {
84 84
                 if ($options->offsetGet('uri')) {
85 85
                     return $route;
86 86
                 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
                 return $route;
93 93
             })
94
-            ->setNormalizer('routeParameters', function (Options $options, $routeParameters) {
94
+            ->setNormalizer('routeParameters', function(Options $options, $routeParameters) {
95 95
                 if (null === $routeParameters) {
96 96
                     return [];
97 97
                 }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
                 return $routeParameters;
121 121
             })
122
-            ->setNormalizer('admin', function (Options $options, $adminName) {
122
+            ->setNormalizer('admin', function(Options $options, $adminName) {
123 123
                 // user has to defined either an admin name and an action name, or a route name with optional
124 124
                 // parameters, or an url
125 125
                 if (null === $adminName
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 return $adminName;
133 133
             })
134 134
             // if an admin name is set, an action name can provided. This action will be the menu link
135
-            ->setNormalizer('action', function (Options $options, $action) {
135
+            ->setNormalizer('action', function(Options $options, $action) {
136 136
                 // if an action name is provided, an admin name should be defined too
137 137
                 if (null !== $action && null === $options->offsetGet('admin')) {
138 138
                     throw new InvalidOptionsException('You should provide an admin name for this action '.$action);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
                 return $action;
147 147
             })
148
-            ->setNormalizer('children', function (Options $options, $items) {
148
+            ->setNormalizer('children', function(Options $options, $items) {
149 149
                 if (!is_array($items)) {
150 150
                     $items = [];
151 151
                 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
                 return $resolvedItems;
165 165
             })
166
-            ->setNormalizer('text', function (Options $options, $text) {
166
+            ->setNormalizer('text', function(Options $options, $text) {
167 167
                 if ($text) {
168 168
                     return $text;
169 169
                 }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
                 return $text;
186 186
             })
187
-            ->setNormalizer('linkAttributes', function (Options $options, $linkAttributes) {
187
+            ->setNormalizer('linkAttributes', function(Options $options, $linkAttributes) {
188 188
                 if (!$linkAttributes) {
189 189
                     $linkAttributes = [];
190 190
                 }
Please login to merge, or discard this patch.