Passed
Pull Request — master (#145)
by
unknown
18:15 queued 05:09
created
src/Configuration/AdminConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
                 null,
77 77
                 'pagerfanta',
78 78
             ])
79
-            ->setNormalizer('actions', function (Options $options, $actions) {
79
+            ->setNormalizer('actions', function(Options $options, $actions) {
80 80
                 $normalizedActions = [];
81 81
                 $addBatchAction = false;
82 82
 
Please login to merge, or discard this patch.
src/Configuration/MenuConfiguration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 'vertical',
54 54
                 null,
55 55
             ])
56
-            ->setNormalizer('position', function (Options $options, $value) {
56
+            ->setNormalizer('position', function(Options $options, $value) {
57 57
                 if ('top' === $this->menuName && null === $value) {
58 58
                     $value = 'horizontal';
59 59
                 }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
                 return $value;
66 66
             })
67
-            ->setNormalizer('template', function (Options $options, $value) {
67
+            ->setNormalizer('template', function(Options $options, $value) {
68 68
                 // Define bootstrap navbar component template
69 69
                 if ('horizontal' === $options->offsetGet('position')) {
70 70
                     $value = '@LAGAdmin/Menu/menu.horizontal.html.twig';
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                 return $value;
79 79
             })
80
-            ->setNormalizer('attr', function (Options $options, $value) {
80
+            ->setNormalizer('attr', function(Options $options, $value) {
81 81
                 $position = $options->offsetGet('position');
82 82
 
83 83
                 if (!key_exists('class', $value)) {
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
                 return $value;
102 102
             })
103
-            ->setNormalizer('item_css_class', function (Options $options, $value) {
103
+            ->setNormalizer('item_css_class', function(Options $options, $value) {
104 104
                 $position = $options->offsetGet('position');
105 105
 
106 106
                 if (!$value) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
                 return trim($value);
119 119
             })
120
-            ->setNormalizer('brand', function (Options $options, $value) {
120
+            ->setNormalizer('brand', function(Options $options, $value) {
121 121
                 if (null === $value && 'horizontal' === $options->offsetGet('position')) {
122 122
                     $value = $this->applicationName;
123 123
                 }
Please login to merge, or discard this patch.
src/Factory/FormFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
         if ('array' === $type) {
121 121
             $builder
122 122
                 ->get($field)
123
-                ->addModelTransformer(new CallbackTransformer(function (?array $value = null) {
123
+                ->addModelTransformer(new CallbackTransformer(function(?array $value = null) {
124 124
                     if (null === $value) {
125 125
                         $value = [];
126 126
                     }
127 127
 
128 128
                     return Yaml::dump($value);
129
-                }, function ($value) {
129
+                }, function($value) {
130 130
                     if (null === $value) {
131 131
                         return [];
132 132
                     }
@@ -139,13 +139,13 @@  discard block
 block discarded – undo
139 139
         if ('simple_array' === $type) {
140 140
             $builder
141 141
                 ->get($field)
142
-                ->addModelTransformer(new CallbackTransformer(function (?array $value = null) {
142
+                ->addModelTransformer(new CallbackTransformer(function(?array $value = null) {
143 143
                     if (null === $value) {
144 144
                         $value = [];
145 145
                     }
146 146
 
147 147
                     return implode(',', $value);
148
-                }, function ($value) {
148
+                }, function($value) {
149 149
                     if (null === $value) {
150 150
                         return [];
151 151
                     }
Please login to merge, or discard this patch.
tests/AdminBundle/Configuration/ActionConfigurationTest.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
     public function testResolveOptionsWithMissingAction()
47 47
     {
48 48
         $adminConfiguration = $this->createAdminConfigurationMock([
49
-            ['actions', [],],
49
+            ['actions', [], ],
50 50
         ], 2);
51 51
 
52 52
         $configuration = new ActionConfiguration('my_action', 'my_admin', $adminConfiguration);
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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         $resolver
25 25
             ->setDefault('class', '')
26
-            ->setNormalizer('class', function (Options $options, $value) {
26
+            ->setNormalizer('class', function(Options $options, $value) {
27 27
                 if ($value) {
28 28
                     return $value;
29 29
                 }
Please login to merge, or discard this patch.
src/Field/ActionCollectionField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 'template' => '@LAGAdmin/Field/actionCollection.html.twig',
32 32
                 'actions' => [],
33 33
             ])
34
-            ->setNormalizer('actions', function (Options $options, $value) use ($actionConfiguration) {
34
+            ->setNormalizer('actions', function(Options $options, $value) use ($actionConfiguration) {
35 35
                 if (!is_array($value) || 0 === count($value)) {
36 36
                     $value = [
37 37
                         'edit' => [],
Please login to merge, or discard this patch.
tests/AdminBundle/Factory/ViewFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
      */
227 227
     public function testCreateRedirectionWithException()
228 228
     {
229
-        list($factory, , ,) = $this->createFactory();
229
+        list($factory,,,) = $this->createFactory();
230 230
 
231 231
         $request = $this->createMock(Request::class);
232 232
         $adminConfiguration = $this->createMock(AdminConfiguration::class);
Please login to merge, or discard this patch.
src/Configuration/MenuItemConfiguration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             ->setDefault('items', [])
54 54
             ->setDefault('icon', null)
55 55
             ->setDefault('link_css_class', 'nav-link')
56
-            ->setNormalizer('admin', function (Options $options, $adminName) {
56
+            ->setNormalizer('admin', function(Options $options, $adminName) {
57 57
                 // user has to defined either an admin name and an action name, or a route name with optional
58 58
                 // parameters, or an url
59 59
                 if (null === $adminName
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 return $adminName;
67 67
             })
68 68
             // if an admin name is set, an action name can provided. This action will be the menu link
69
-            ->setNormalizer('action', function (Options $options, $action) {
69
+            ->setNormalizer('action', function(Options $options, $action) {
70 70
                 // if an action name is provided, an admin name should be defined too
71 71
                 if (null !== $action && null === $options->offsetGet('admin')) {
72 72
                     throw new InvalidOptionsException('You should provide an admin name for this action '.$action);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 return $action;
81 81
             })
82 82
             ->setAllowedTypes('parameters', 'array')
83
-            ->setNormalizer('attr', function (Options $options, $attr) {
83
+            ->setNormalizer('attr', function(Options $options, $attr) {
84 84
                 if (!is_array($attr)) {
85 85
                     $attr = [];
86 86
                 }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
                 return $attr;
97 97
             })
98
-            ->setNormalizer('link_attr', function (Options $options, $value) {
98
+            ->setNormalizer('link_attr', function(Options $options, $value) {
99 99
                 if (!is_array($value)) {
100 100
                     $value = [];
101 101
                 }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
                 return $value;
108 108
             })
109
-            ->setNormalizer('items', function (Options $options, $items) {
109
+            ->setNormalizer('items', function(Options $options, $items) {
110 110
                 if (!is_array($items)) {
111 111
                     $items = [];
112 112
                 }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
                 return $resolvedItems;
125 125
             })
126
-            ->setNormalizer('text', function (Options $options, $text) {
126
+            ->setNormalizer('text', function(Options $options, $text) {
127 127
                 if ($text) {
128 128
                     return $text;
129 129
                 }
Please login to merge, or discard this patch.
src/Field/LinkField.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 '_self',
57 57
                 '_blank',
58 58
             ])
59
-            ->setNormalizer('route', function (Options $options, $value) use ($actionConfiguration) {
59
+            ->setNormalizer('route', function(Options $options, $value) use ($actionConfiguration) {
60 60
                 // route or url should be defined
61 61
                 if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) {
62 62
                     throw new InvalidOptionsException('Either an url or a route should be defined');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
                 return $value;
74 74
             })
75
-            ->setNormalizer('admin', function (Options $options, $value) {
75
+            ->setNormalizer('admin', function(Options $options, $value) {
76 76
                 // if a Admin is defined, an Action should be defined too
77 77
                 if ($value && !$options->offsetGet('action')) {
78 78
                     throw new InvalidOptionsException('An Action should be provided if an Admin is provided');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
                 return $value;
82 82
             })
83
-            ->setNormalizer('parameters', function (Options $options, $values) {
83
+            ->setNormalizer('parameters', function(Options $options, $values) {
84 84
                 $cleanedValues = [];
85 85
 
86 86
                 foreach ($values as $name => $method) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
                 return $cleanedValues;
94 94
             })
95
-            ->setNormalizer('text', function (Options $options, $value) use ($actionConfiguration) {
95
+            ->setNormalizer('text', function(Options $options, $value) use ($actionConfiguration) {
96 96
                 if ($value) {
97 97
                     return $value;
98 98
                 }
Please login to merge, or discard this patch.