Completed
Push — master ( 53c52b...b733d6 )
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
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 //'allow_safe_labels' => true,
75 75
                 'extras' => ['safe_label' => true],
76 76
             ])
77
-            ->setNormalizer('route', function (Options $options, $route) {
77
+            ->setNormalizer('route', function(Options $options, $route) {
78 78
                 if ($options->offsetGet('uri')) {
79 79
                     return $route;
80 80
                 }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
                 return $route;
87 87
             })
88
-            ->setNormalizer('routeParameters', function (Options $options, $routeParameters) {
88
+            ->setNormalizer('routeParameters', function(Options $options, $routeParameters) {
89 89
                 if ($routeParameters === null) {
90 90
                     return [];
91 91
                 }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
                 return $routeParameters;
115 115
             })
116
-            ->setNormalizer('admin', function (Options $options, $adminName) {
116
+            ->setNormalizer('admin', function(Options $options, $adminName) {
117 117
                 // user has to defined either an admin name and an action name, or a route name with optional
118 118
                 // parameters, or an url
119 119
                 if (null === $adminName
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                 return $adminName;
127 127
             })
128 128
             // if an admin name is set, an action name can provided. This action will be the menu link
129
-            ->setNormalizer('action', function (Options $options, $action) {
129
+            ->setNormalizer('action', function(Options $options, $action) {
130 130
                 // if an action name is provided, an admin name should be defined too
131 131
                 if ($action !== null && $options->offsetGet('admin') === null) {
132 132
                     throw new InvalidOptionsException('You should provide an admin name for this action '.$action);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
                 return $action;
141 141
             })
142
-            ->setNormalizer('children', function (Options $options, $items) {
142
+            ->setNormalizer('children', function(Options $options, $items) {
143 143
                 if (!is_array($items)) {
144 144
                     $items = [];
145 145
                 }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                 return $resolvedItems;
159 159
             })
160
-            ->setNormalizer('text', function (Options $options, $text) {
160
+            ->setNormalizer('text', function(Options $options, $text) {
161 161
                 if ($text) {
162 162
                     return $text;
163 163
                 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
                 return $text;
180 180
             })
181
-            ->setNormalizer('linkAttributes', function (Options $options, $linkAttributes) {
181
+            ->setNormalizer('linkAttributes', function(Options $options, $linkAttributes) {
182 182
                 if (!$linkAttributes) {
183 183
                     $linkAttributes = [];
184 184
                 }
Please login to merge, or discard this patch.