Completed
Push — master ( 1fe708...6360f1 )
by Arnaud
16s queued 12s
created
src/Configuration/AdminConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
     private function getActionNormalizer(): Closure
224 224
     {
225
-        return function (Options $options, $actions) {
225
+        return function(Options $options, $actions) {
226 226
             $normalizedActions = [];
227 227
 //            $addBatchAction = false;
228 228
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
     private function getRoutesPatternNormalizer(): Closure
259 259
     {
260
-        return function (Options $options, $value) {
260
+        return function(Options $options, $value) {
261 261
             if (!u($value)->containsAny('{action}')) {
262 262
                 throw new InvalidOptionsException(sprintf('The "%s" parameters in admin "%s" should contains the "%s" parameters', 'routes_pattern', $options->offsetGet('name'), '{action}'));
263 263
             }
Please login to merge, or discard this patch.
src/Configuration/ActionConfiguration.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             ->setAllowedTypes('redirect', ['string', 'null'])
111 111
             ->setDefault('add_return_link', null)
112 112
             ->setAllowedTypes('add_return_link', ['boolean', 'null'])
113
-            ->addNormalizer('add_return_link', function (Options $options, $value) {
113
+            ->addNormalizer('add_return_link', function(Options $options, $value) {
114 114
                 return $value ?? $options->offsetGet('name') !== 'list';
115 115
             })
116 116
         ;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
     private function getTitleNormalizer(): Closure
274 274
     {
275
-        return function (Options $options, $value) {
275
+        return function(Options $options, $value) {
276 276
             if ($value === null) {
277 277
                 $value = u($options->offsetGet('name'))->camel()->title()->toString();
278 278
             }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
     private function getPathNormalizer(): Closure
285 285
     {
286
-        return function (Options $options, $value) {
286
+        return function(Options $options, $value) {
287 287
             if ($value !== null) {
288 288
                 $path = u($value);
289 289
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      */
342 342
     private function getFieldsNormalizer(): Closure
343 343
     {
344
-        return function (Options $options, $fields) {
344
+        return function(Options $options, $fields) {
345 345
             $normalizedFields = [];
346 346
 
347 347
             foreach ($fields as $name => $field) {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
      */
362 362
     private function getOrderNormalizer(): Closure
363 363
     {
364
-        return function (Options $options, $order) {
364
+        return function(Options $options, $order) {
365 365
             foreach ($order as $field => $sort) {
366 366
                 if (!\is_string($sort) || !\is_string($field) || !\in_array(strtolower($sort), ['asc', 'desc'])) {
367 367
                     throw new Exception('Order value should be an array of string (["field" => $key]), got '.\gettype($sort));
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 
375 375
     private function getLoadStrategyNormalizer(): Closure
376 376
     {
377
-        return function (Options $options, $value) {
377
+        return function(Options $options, $value) {
378 378
             if ($value !== null) {
379 379
                 return $value;
380 380
             }
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
      */
398 398
     private function getCriteriaNormalizer(): Closure
399 399
     {
400
-        return function (Options $options, $value) {
400
+        return function(Options $options, $value) {
401 401
             if (!$value) {
402 402
                 $idActions = [
403 403
                     'edit',
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
      */
421 421
     private function getFiltersNormalizer(): Closure
422 422
     {
423
-        return function (Options $options, $data) {
423
+        return function(Options $options, $data) {
424 424
             $normalizedData = [];
425 425
 
426 426
             foreach ($data as $name => $field) {
@@ -446,7 +446,7 @@  discard block
 block discarded – undo
446 446
 
447 447
     private function getFormNormalizer(): Closure
448 448
     {
449
-        return function (Options $options, $value) {
449
+        return function(Options $options, $value) {
450 450
             if ($value !== null && $value !== false) {
451 451
                 return $value;
452 452
             }
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 
471 471
     private function getRouteParametersNormalizer(): Closure
472 472
     {
473
-        return function (Options $options, $value) {
473
+        return function(Options $options, $value) {
474 474
             if (\count($value) > 0) {
475 475
                 return $value;
476 476
             }
Please login to merge, or discard this patch.
src/Field/AbstractField.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             ->setAllowedTypes('translation', ['boolean'])
50 50
             ->setAllowedTypes('translation_domain', ['string', 'null'])
51 51
             ->setAllowedTypes('sortable', ['boolean'])
52
-            ->addNormalizer('attr', function (Options $options, $value) {
52
+            ->addNormalizer('attr', function(Options $options, $value) {
53 53
                 if ($value === null) {
54 54
                     $value = [];
55 55
                 }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
                 return $value;
64 64
             })
65
-            ->addNormalizer('header_attr', function (Options $options, $value) {
65
+            ->addNormalizer('header_attr', function(Options $options, $value) {
66 66
                 if ($value === null) {
67 67
                     $value = [];
68 68
                 }
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
 
76 76
                 return $value;
77 77
             })
78
-            ->setNormalizer('mapped', function (Options $options, $mapped) {
78
+            ->setNormalizer('mapped', function(Options $options, $mapped) {
79 79
                 if (u($this->getName())->startsWith('_')) {
80 80
                     return true;
81 81
                 }
82 82
 
83 83
                 return $mapped;
84 84
             })
85
-            ->setNormalizer('property_path', function (Options $options, $propertyPath) {
85
+            ->setNormalizer('property_path', function(Options $options, $propertyPath) {
86 86
                 if (u($this->getName())->startsWith('_')) {
87 87
                     return null;
88 88
                 }
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
-            ->addNormalizer('attr', function (Options $options, $value) {
25
+            ->addNormalizer('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.
tests/phpunit/Field/Render/FieldRendererTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $field
40 40
             ->expects($this->once())
41 41
             ->method('getDataTransformer')
42
-            ->willReturn(function ($value) {
42
+            ->willReturn(function($value) {
43 43
                 return u($value)->title()->toString();
44 44
             })
45 45
         ;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             ->environment
63 63
             ->expects($this->once())
64 64
             ->method('render')
65
-            ->willReturnCallback(function ($template, $context) use($data) {
65
+            ->willReturnCallback(function($template, $context) use($data) {
66 66
                 $this->assertEquals('@LAGAdmin/fields/string.html.twig', $template);
67 67
                 $this->assertEquals([
68 68
                     'data' => 'My_value',
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $field
94 94
             ->expects($this->once())
95 95
             ->method('getDataTransformer')
96
-            ->willReturn(function ($value) {
96
+            ->willReturn(function($value) {
97 97
                 return u($value)->title()->toString();
98 98
             })
99 99
         ;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             ->environment
114 114
             ->expects($this->once())
115 115
             ->method('render')
116
-            ->willReturnCallback(function () {
116
+            ->willReturnCallback(function() {
117 117
                 throw new Exception();
118 118
             })
119 119
         ;
Please login to merge, or discard this patch.
tests/phpunit/Event/Listener/Data/LoadDataListenerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function testInvokeWithStrategyUnique(): void
57 57
     {
58
-        [$event,$admin,,$adminConfiguration,$actionConfiguration,$request] = $this->createDataEvent();
58
+        [$event, $admin,,$adminConfiguration, $actionConfiguration, $request] = $this->createDataEvent();
59 59
         $request->query->set('id', 666);
60 60
 
61 61
         $dataProvider = $this->createMock(AdminAwareDataProviderInterface::class);
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     public function testInvokeWithStrategyUniqueWithoutIdentifier(): void
110 110
     {
111
-        [$event,$admin,$action,$adminConfiguration,$actionConfiguration,] = $this->createDataEvent();
111
+        [$event, $admin, $action, $adminConfiguration, $actionConfiguration, ] = $this->createDataEvent();
112 112
 
113 113
         $dataProvider = $this->createMock(AdminAwareDataProviderInterface::class);
114 114
         $admin
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     public function testInvokeWithStrategyMultiple(): void
166 166
     {
167
-        [$event,$admin,$action,$adminConfiguration,$actionConfiguration,] = $this->createDataEvent();
167
+        [$event, $admin, $action, $adminConfiguration, $actionConfiguration, ] = $this->createDataEvent();
168 168
 
169 169
         $dataProvider = $this->createMock(AdminAwareDataProviderInterface::class);
170 170
 
Please login to merge, or discard this patch.
tests/phpunit/Factory/FieldFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             ->eventDispatcher
25 25
             ->expects($this->exactly(3))
26 26
             ->method('dispatch')
27
-            ->willReturnCallback(function ($event) {
27
+            ->willReturnCallback(function($event) {
28 28
                 if ($event instanceof FieldEvent) {
29 29
                     $this->assertEquals([
30 30
                         'template' => 'string.html.twig',
Please login to merge, or discard this patch.