Completed
Pull Request — master (#152)
by Arnaud
03:20
created
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
                     return $value;
364 364
                 }
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
             ->setAllowedTypes('route_path', 'string')
430 430
             ->setAllowedTypes('route_defaults', 'array')
431 431
             ->setAllowedTypes('route_requirements', 'array')
432
-            ->setNormalizer('route_defaults', function (Options $options, $value) {
432
+            ->setNormalizer('route_defaults', function(Options $options, $value) {
433 433
                 if (!$value || is_array($value)) {
434 434
                     $value = [];
435 435
                 }
Please login to merge, or discard this patch.
tests/AdminBundle/Assets/Registry/AssetsRegistryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         $environment = $this->createMock(Environment::class);
15 15
         $registry = new ScriptRegistry($environment);
16 16
 
17
-        $this->assertExceptionRaised(Exception::class, function () use ($registry) {
17
+        $this->assertExceptionRaised(Exception::class, function() use ($registry) {
18 18
             $registry->unregister('footer', 'test.js');
19 19
         });
20 20
 
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
         ]);
51 51
 
52 52
         $configuration = new ActionConfiguration('my_action', 'my_admin', $adminConfiguration);
Please login to merge, or discard this patch.
tests/AdminBundle/Admin/AdminTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         );
81 81
         $request = new Request();
82 82
 
83
-        $this->assertExceptionRaised(Exception::class, function () use ($admin) {
83
+        $this->assertExceptionRaised(Exception::class, function() use ($admin) {
84 84
             $admin->getRequest();
85 85
         });
86 86
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $this->assertCount(1, $admin->getForms());
101 101
         $this->assertEquals($form, $admin->getForms()['entity']);
102 102
         $this->assertEquals($form, $admin->getForm('entity'));
103
-        $this->assertExceptionRaised(Exception::class, function () use ($admin) {
103
+        $this->assertExceptionRaised(Exception::class, function() use ($admin) {
104 104
             $admin->getForm('invalid');
105 105
         });
106 106
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function getHandleRequestProvider(): array
109 109
     {
110 110
         return [
111
-            [['test',],],
111
+            [['test', ], ],
112 112
             [[]]
113 113
         ];
114 114
     }
Please login to merge, or discard this patch.
tests/AdminBundle/Admin/Helper/AdminHelperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
         $this->assertEquals($admin, $helper->getCurrent());
22 22
 
23
-        $this->assertExceptionRaised(Exception::class, function () use ($helper, $admin) {
23
+        $this->assertExceptionRaised(Exception::class, function() use ($helper, $admin) {
24 24
             $helper->setCurrent($admin);
25 25
         });
26 26
     }
Please login to merge, or discard this patch.
tests/AdminBundle/Event/Subscriber/MenuSubscriberTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function testBuildMenu()
32 32
     {
33
-        list($subscriber, , $menuFactory, $eventDispatcher) = $this->createSubscriber([
33
+        list($subscriber,, $menuFactory, $eventDispatcher) = $this->createSubscriber([
34 34
             'my_little_menu' => [],
35 35
         ], [
36 36
             ['enable_menus', true],
Please login to merge, or discard this patch.