Passed
Pull Request — master (#138)
by Arnaud
08:18 queued 05:22
created
src/Configuration/ApplicationConfiguration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             ->setAllowedTypes('routing_name_pattern', 'string')
88 88
             ->setAllowedTypes('routing_url_pattern', 'string')
89 89
             ->setAllowedTypes('page_parameter', 'string')
90
-            ->setNormalizer('routing_name_pattern', function (Options $options, $value) {
90
+            ->setNormalizer('routing_name_pattern', function(Options $options, $value) {
91 91
                 if (false === strstr($value, '{admin}')) {
92 92
                     throw new InvalidOptionsException('Admin routing configuration pattern name should contains the {admin} placeholder');
93 93
                 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
                 return $value;
99 99
             })
100
-            ->setNormalizer('routing_url_pattern', function (Options $options, $value) {
100
+            ->setNormalizer('routing_url_pattern', function(Options $options, $value) {
101 101
                 if (false === strstr($value, '{admin}')) {
102 102
                     throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder');
103 103
                 }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         $resolver->setDefault('fields_mapping', $defaultMapping);
137 137
         $resolver->setAllowedTypes('fields_mapping', 'array');
138
-        $resolver->setNormalizer('fields_mapping', function (Options $options, $value) use ($defaultMapping) {
138
+        $resolver->setNormalizer('fields_mapping', function(Options $options, $value) use ($defaultMapping) {
139 139
             // Merge with default mapping to allow override
140 140
             $value = array_merge($defaultMapping, $value);
141 141
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         $resolver->setDefault('fields_template_mapping', $defaultMapping);
151 151
         $resolver->setAllowedTypes('fields_template_mapping', 'array');
152
-        $resolver->setNormalizer('fields_template_mapping', function (Options $options, $value) use ($defaultMapping) {
152
+        $resolver->setNormalizer('fields_template_mapping', function(Options $options, $value) use ($defaultMapping) {
153 153
             // Merge with default mapping to allow override
154 154
             $value = array_merge($defaultMapping, $value);
155 155
 
Please login to merge, or discard this patch.
src/Configuration/Behavior/TranslationConfigurationTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $resolver
16 16
             ->setDefaults([
17
-                'translation' => function (OptionsResolver $subResolver) use ($pattern, $catalog) {
17
+                'translation' => function(OptionsResolver $subResolver) use ($pattern, $catalog) {
18 18
                     $subResolver
19 19
                         ->setDefaults([
20 20
                             'enabled' => true,
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                 },
26 26
             ])
27 27
             ->setAllowedTypes('translation', 'array')
28
-            ->setNormalizer('translation', function (Options $options, $value) {
28
+            ->setNormalizer('translation', function(Options $options, $value) {
29 29
                 if (!array_key_exists('enabled', $value)) {
30 30
                     throw new InvalidOptionsException('Admin translation enabled parameter should be defined');
31 31
                 }
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
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     private function getFieldsNormalizer()
150 150
     {
151
-        return function (Options $options, $fields) {
151
+        return function(Options $options, $fields) {
152 152
             $normalizedFields = [];
153 153
 
154 154
             foreach ($fields as $name => $field) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     private function getOrderNormalizer()
172 172
     {
173
-        return function (Options $options, $order) {
173
+        return function(Options $options, $order) {
174 174
             foreach ($order as $field => $sort) {
175 175
                 if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
176 176
                     throw new Exception('Order value should be an array of string (["field" => $key]), got '.gettype($sort));
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     private function getLoadStrategyNormalizer()
191 191
     {
192
-        return function (Options $options, $value) {
192
+        return function(Options $options, $value) {
193 193
             if (!$value) {
194 194
                 if ('create' == $this->actionName) {
195 195
                     $value = LAGAdminBundle::LOAD_STRATEGY_NONE;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     private function getMenuNormalizer()
214 214
     {
215
-        return function (Options $options, $menus) {
215
+        return function(Options $options, $menus) {
216 216
             // set default to an array
217 217
             if (false === $menus) {
218 218
                 $menus = [];
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     private function getCriteriaNormalizer()
232 232
     {
233
-        return function (Options $options, $value) {
233
+        return function(Options $options, $value) {
234 234
             if (!$value) {
235 235
                 $idActions = [
236 236
                     'edit',
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     private function getFiltersNormalizer(): Closure
270 270
     {
271
-        return function (Options $options, $data) {
271
+        return function(Options $options, $data) {
272 272
             $normalizedData = [];
273 273
 
274 274
             foreach ($data as $name => $field) {
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
     private function getRouteDefaultNormalizer(): Closure
296 296
     {
297
-        return function (Options $options, $value) {
297
+        return function(Options $options, $value) {
298 298
             if (!is_array($value)) {
299 299
                 $value = [];
300 300
             }
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
     private function getFormNormalizer(): Closure
309 309
     {
310
-        return function (Options $options, $value) {
310
+        return function(Options $options, $value) {
311 311
             if (null !== $value) {
312 312
                 return $value;
313 313
             }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
     private function getTitleNormalizer(): Closure
329 329
     {
330
-        return function (Options $options, $value) {
330
+        return function(Options $options, $value) {
331 331
             // If the translation system is not used, return the provided value as is
332 332
             if (!$this->adminConfiguration->isTranslationEnabled()) {
333 333
                 return $value;
Please login to merge, or discard this patch.