Passed
Pull Request — master (#300)
by Arnaud
06:23
created
Category
src/Event/Listener/Data/CreateDataFilterListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 }
46 46
 
47 47
                 if (\is_array($data[$name])) {
48
-                    $check = array_filter($data[$name], function ($value) {
48
+                    $check = array_filter($data[$name], function($value) {
49 49
                         return $value !== null;
50 50
                     });
51 51
 
Please login to merge, or discard this patch.
src/Form/Type/TinyMce/TinyMceType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                 'custom_buttons' => [],
29 29
             ])
30 30
             ->setAllowedTypes('tinymce_options', 'array')
31
-            ->addNormalizer('tinymce_options', function (Options $options, $value) {
31
+            ->addNormalizer('tinymce_options', function(Options $options, $value) {
32 32
                 $attr = $options->offsetGet('attr');
33 33
 
34 34
                 if (\array_key_exists('id', $attr)) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 return array_replace_recursive($this->getTinyMceDefaultConfiguration(), $value);
42 42
             })
43 43
             ->setAllowedTypes('custom_buttons', 'array')
44
-            ->addNormalizer('custom_buttons', function (Options $options, $value) {
44
+            ->addNormalizer('custom_buttons', function(Options $options, $value) {
45 45
                 foreach ($value as $item => $button) {
46 46
                     $buttonResolver = new OptionsResolver();
47 47
                     $buttonResolver->setDefaults([
Please login to merge, or discard this patch.
src/Routing/Parameter/ParametersMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         $mappedRouteParameters = [];
13 13
 
14 14
         foreach ($routeParameters as $parameter => $requirements) {
15
-            $mappedRouteParameters[$parameter] = $accessor->getValue($data, (string)$parameter);
15
+            $mappedRouteParameters[$parameter] = $accessor->getValue($data, (string) $parameter);
16 16
         }
17 17
 
18 18
         return $mappedRouteParameters;
Please login to merge, or discard this patch.
src/Admin/Configuration/AdminConfiguration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             ->setAllowedTypes('name', 'string')
31 31
             ->setDefault('title', null)
32 32
             ->setAllowedTypes('title', ['string', 'null'])
33
-            ->addNormalizer('title', function (Options $options, $value) {
33
+            ->addNormalizer('title', function(Options $options, $value) {
34 34
                 if ($value === null) {
35 35
                     $value = u($options->offsetGet('name'))->title()->toString();
36 36
                 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 'delete' => [],
53 53
             ])
54 54
             ->setAllowedTypes('list_actions', 'array')
55
-            ->setNormalizer('list_actions', function (Options $options, $value) {
55
+            ->setNormalizer('list_actions', function(Options $options, $value) {
56 56
                 foreach ($value as $actionName => $actionConfiguration) {
57 57
                     $value[$actionName] = LinkNormalizer::normalize(
58 58
                         $actionConfiguration,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 'create' => [],
69 69
             ])
70 70
             ->setAllowedTypes('item_actions', 'array')
71
-            ->setNormalizer('item_actions', function (Options $options, $value) {
71
+            ->setNormalizer('item_actions', function(Options $options, $value) {
72 72
                 foreach ($value as $actionName => $actionConfiguration) {
73 73
                     $value[$actionName] = LinkNormalizer::normalize(
74 74
                         $actionConfiguration,
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
     private function getActionNormalizer(): Closure
276 276
     {
277
-        return function (Options $options, $actions) {
277
+        return function(Options $options, $actions) {
278 278
             $normalizedActions = [];
279 279
 //            $addBatchAction = false;
280 280
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
     private function getRoutesPatternNormalizer(): Closure
312 312
     {
313
-        return function (Options $options, $value) {
313
+        return function(Options $options, $value) {
314 314
             if (!u($value)->containsAny('{action}')) {
315 315
                 throw new InvalidOptionsException(sprintf('The "%s" parameters in admin "%s" should contains the "%s" parameters', 'routes_pattern', $options->offsetGet('name'), '{action}'));
316 316
             }
Please login to merge, or discard this patch.
src/Translation/Helper/TranslationHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     ) {
18 18
     }
19 19
 
20
-    public function getTranslationKey(string $key , string $adminName = 'ui'): string
20
+    public function getTranslationKey(string $key, string $adminName = 'ui'): string
21 21
     {
22 22
         $translationPattern = $this->applicationConfiguration->getTranslationPattern();
23 23
         $translationPattern = str_replace('{key}', $key, $translationPattern);
Please login to merge, or discard this patch.
src/Field/LinkField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 'title' => null,
37 37
                 'url' => '',
38 38
             ])
39
-            ->setNormalizer('route', function (Options $options, $value) use ($applicationConfiguration) {
39
+            ->setNormalizer('route', function(Options $options, $value) use ($applicationConfiguration) {
40 40
                 // A route, an url or an admin should be defined
41 41
                 if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) {
42 42
                     throw new InvalidOptionsException('Either an url or a route should be defined');
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
                 return $value;
50 50
             })
51
-            ->setNormalizer('admin', function (Options $options, $value) {
51
+            ->setNormalizer('admin', function(Options $options, $value) {
52 52
                 // if a Admin is defined, an Action should be defined too
53 53
                 if ($value && !$options->offsetGet('action')) {
54 54
                     throw new InvalidOptionsException('An Action should be provided if an Admin is provided');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
                 return $value;
58 58
             })
59
-            ->setNormalizer('text', function (Options $options, $value) {
59
+            ->setNormalizer('text', function(Options $options, $value) {
60 60
                 if ($value) {
61 61
                     return $value;
62 62
                 }
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
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 'translation' => true,
26 26
                 'property_path' => null,
27 27
             ])
28
-            ->addNormalizer('attr', function (Options $options, $value) {
28
+            ->addNormalizer('attr', function(Options $options, $value) {
29 29
                 if (!empty($value['class'])) {
30 30
                     return $value;
31 31
                 }
Please login to merge, or discard this patch.
tests/phpunit/Admin/Helper/AdminHelperTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     {
14 14
         $helper = new AdminContext();
15 15
 
16
-        $this->assertExceptionRaised(Exception::class, function () use ($helper) {
16
+        $this->assertExceptionRaised(Exception::class, function() use ($helper) {
17 17
             $helper->getAdmin();
18 18
         });
19 19
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
         $this->assertEquals($admin, $helper->getAdmin());
24 24
 
25
-        $this->assertExceptionRaised(Exception::class, function () use ($helper, $admin) {
25
+        $this->assertExceptionRaised(Exception::class, function() use ($helper, $admin) {
26 26
             $helper->setAdmin($admin);
27 27
         });
28 28
     }
Please login to merge, or discard this patch.
tests/phpunit/Configuration/ActionConfigurationTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -350,12 +350,12 @@
 block discarded – undo
350 350
     public function filterFormDataProviderNormalizer(): array
351 351
     {
352 352
         return [
353
-            [null, 'my_action',  null],
354
-            [false, 'my_action',  null],
355
-            [null, 'create',  AdminType::class],
356
-            ['MyForm', 'create',  'MyForm'],
357
-            [null, 'update',  AdminType::class],
358
-            [null, 'delete',  DeleteType::class],
353
+            [null, 'my_action', null],
354
+            [false, 'my_action', null],
355
+            [null, 'create', AdminType::class],
356
+            ['MyForm', 'create', 'MyForm'],
357
+            [null, 'update', AdminType::class],
358
+            [null, 'delete', DeleteType::class],
359 359
         ];
360 360
     }
361 361
 
Please login to merge, or discard this patch.