Completed
Push — refonte ( 5fcd2e...480e31 )
by Arnaud
02:16
created
src/Configuration/ActionConfiguration.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 
16 16
 class ActionConfiguration extends Configuration
17 17
 {
18
-     /**
19
-     * Related Action name.
20
-     *
21
-     * @var string
22
-     */
18
+        /**
19
+         * Related Action name.
20
+         *
21
+         * @var string
22
+         */
23 23
     private $actionName;
24 24
 
25 25
     /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     private function getFieldsNormalizer()
166 166
     {
167
-        return function (Options $options, $fields) {
167
+        return function(Options $options, $fields) {
168 168
             $normalizedFields = [];
169 169
 
170 170
             foreach ($fields as $name => $field) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     private function getOrderNormalizer()
189 189
     {
190
-        return function (Options $options, $order) {
190
+        return function(Options $options, $order) {
191 191
             foreach ($order as $field => $sort) {
192 192
 
193 193
                 if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     private function getLoadStrategyNormalizer()
213 213
     {
214
-        return function (Options $options, $value) {
214
+        return function(Options $options, $value) {
215 215
             if (!$value) {
216 216
                 if ($this->actionName == 'create') {
217 217
                     $value = LAGAdminBundle::LOAD_STRATEGY_NONE;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     private function getMenuNormalizer()
236 236
     {
237
-        return function (Options $options, $menus) {
237
+        return function(Options $options, $menus) {
238 238
             // set default to an array
239 239
             if ($menus === false) {
240 240
                 $menus = [];
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      */
253 253
     private function getCriteriaNormalizer()
254 254
     {
255
-        return function (Options $options, $value) {
255
+        return function(Options $options, $value) {
256 256
             if (!$value) {
257 257
                 $idActions = [
258 258
                     'edit',
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
      */
302 302
     private function getFiltersNormalizer()
303 303
     {
304
-        return function (Options $options, $data) {
304
+        return function(Options $options, $data) {
305 305
             $normalizedData = [];
306 306
 
307 307
             foreach ($data as $name => $field) {
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
     private function getRouteDefaultNormalizer()
329 329
     {
330
-        return function (Options $options, $value) {
330
+        return function(Options $options, $value) {
331 331
             if (!is_array($value)) {
332 332
                 $value = [];
333 333
             }
Please login to merge, or discard this patch.
tests/AdminBundle/Admin/AdminTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $eventDispatcher
48 48
             ->expects($this->exactly(5))
49 49
             ->method('dispatch')
50
-            ->willReturnCallback(function ($eventName, $event) use ($action, $form) {
50
+            ->willReturnCallback(function($eventName, $event) use ($action, $form) {
51 51
                 if (AdminEvents::HANDLE_REQUEST === $eventName) {
52 52
                     /** @var AdminEvent $event */
53 53
                     $this->assertInstanceOf(AdminEvent::class, $event);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         );
113 113
         $request = new Request();
114 114
 
115
-        $this->assertExceptionRaised(Exception::class, function () use ($admin, $request) {
115
+        $this->assertExceptionRaised(Exception::class, function() use ($admin, $request) {
116 116
             $admin->handleRequest($request);
117 117
         });
118 118
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         $eventDispatcher
128 128
             ->expects($this->once())
129 129
             ->method('dispatch')
130
-            ->willReturnCallback(function ($eventName, $event) use ($view) {
130
+            ->willReturnCallback(function($eventName, $event) use ($view) {
131 131
                 $this->assertEquals(AdminEvents::VIEW, $eventName);
132 132
                 /** @var ViewEvent $event */
133 133
                 $this->assertInstanceOf(ViewEvent::class, $event);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $eventDispatcher
179 179
             ->expects($this->exactly(4))
180 180
             ->method('dispatch')
181
-            ->willReturnCallback(function ($eventName, $event) use ($action, $form) {
181
+            ->willReturnCallback(function($eventName, $event) use ($action, $form) {
182 182
                 if (AdminEvents::HANDLE_REQUEST === $eventName) {
183 183
                     /** @var AdminEvent $event */
184 184
                     $this->assertInstanceOf(AdminEvent::class, $event);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $eventDispatcher
209 209
             ->expects($this->exactly(4))
210 210
             ->method('dispatch')
211
-            ->willReturnCallback(function ($eventName, $event) use ($action, $form) {
211
+            ->willReturnCallback(function($eventName, $event) use ($action, $form) {
212 212
                 if (AdminEvents::HANDLE_REQUEST === $eventName) {
213 213
                     /** @var AdminEvent $event */
214 214
                     $this->assertInstanceOf(AdminEvent::class, $event);
Please login to merge, or discard this patch.
tests/AdminBundle/Controller/HomeActionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $eventDispatcher
35 35
             ->expects($this->once())
36 36
             ->method('dispatch')
37
-            ->willReturnCallback(function ($eventName, $event) {
37
+            ->willReturnCallback(function($eventName, $event) {
38 38
                 $this->assertEquals(AdminEvents::MENU, $eventName);
39 39
                 $this->assertInstanceOf(MenuEvent::class, $event);
40 40
             })
Please login to merge, or discard this patch.
tests/AdminBundle/Event/Subscriber/AdminSubscriberTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         $event = new AdminEvent($admin, $request);
108 108
 
109
-        $this->assertExceptionRaised(Exception::class, function () use ($subscriber, $event) {
109
+        $this->assertExceptionRaised(Exception::class, function() use ($subscriber, $event) {
110 110
             $subscriber->handleRequest($event);
111 111
         });
112 112
     }
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
         $request = new Request();
519 519
         $event = new EntityEvent($admin, $request);
520 520
 
521
-        $this->assertExceptionRaised(Exception::class, function () use ($subscriber, $event) {
521
+        $this->assertExceptionRaised(Exception::class, function() use ($subscriber, $event) {
522 522
             $subscriber->loadEntities($event);
523 523
         });
524 524
     }
Please login to merge, or discard this patch.
tests/AdminBundle/Factory/ActionFactoryTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $configurationFactory
47 47
             ->expects($this->once())
48 48
             ->method('createActionConfiguration')
49
-            ->with('list',  [], 'tauntaun', $adminConfiguration)
49
+            ->with('list', [], 'tauntaun', $adminConfiguration)
50 50
             ->willReturn($actionConfiguration)
51 51
         ;
52 52
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             ])
82 82
         ;
83 83
 
84
-        $this->assertExceptionRaised(Exception::class, function () use ($factory, $adminConfiguration) {
84
+        $this->assertExceptionRaised(Exception::class, function() use ($factory, $adminConfiguration) {
85 85
             $factory->create('list', 'tauntaun', $adminConfiguration);
86 86
         });
87 87
     }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $configurationFactory
118 118
             ->expects($this->once())
119 119
             ->method('createActionConfiguration')
120
-            ->with('list',  [], 'tauntaun', $adminConfiguration)
120
+            ->with('list', [], 'tauntaun', $adminConfiguration)
121 121
             ->willReturn($actionConfiguration)
122 122
         ;
123 123
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $configurationFactory
128 128
         );
129 129
 
130
-        $this->assertExceptionRaised(Exception::class, function () use ($factory, $adminConfiguration) {
130
+        $this->assertExceptionRaised(Exception::class, function() use ($factory, $adminConfiguration) {
131 131
             $factory->create('list', 'tauntaun', $adminConfiguration);
132 132
         });
133 133
     }
Please login to merge, or discard this patch.
src/Bridge/Doctrine/ORM/DataProvider/ORMDataProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         if ('pagerfanta' === $actionConfiguration->getParameter('pager')) {
83 83
             $pageParameter = $actionConfiguration->getParameter('page_parameter');
84 84
             $request = $this->requestStack->getCurrentRequest();
85
-            $page = (int)$request->get($pageParameter, 1);
85
+            $page = (int) $request->get($pageParameter, 1);
86 86
 
87 87
             $adapter = new DoctrineORMAdapter($queryBuilder);
88 88
             $pager = new Pagerfanta($adapter);
Please login to merge, or discard this patch.
tests/AdminBundle/DependencyInjection/LAGAdminExtensionTest.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
         $builder
18 18
             ->expects($this->atLeastOnce())
19 19
             ->method('setParameter')
20
-            ->willReturnCallback(function ($parameter, $value) {
20
+            ->willReturnCallback(function($parameter, $value) {
21 21
                 $this->assertContains($parameter, [
22 22
                     'lag.admin.enable_extra_configuration',
23 23
                     'lag.admin.application_configuration',
Please login to merge, or discard this patch.
src/Configuration/MenuItemConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 
120 120
                 return $resolvedItems;
121 121
             })
122
-            ->setNormalizer('text', function (Options $options, $text) {
122
+            ->setNormalizer('text', function(Options $options, $text) {
123 123
                 if (!$text) {
124 124
                     // TODO use translation pattern key instead
125 125
                     $text = ucfirst($this->name);
Please login to merge, or discard this patch.
src/Configuration/MenuConfiguration.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
                 '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';
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
 
74 74
                 // Define bootstrap nav component template
75 75
                 if ('vertical' === $options->offsetGet('position')) {
76
-                    $value ='@LAGAdmin/Menu/menu.vertical.html.twig';
76
+                    $value = '@LAGAdmin/Menu/menu.vertical.html.twig';
77 77
                 }
78 78
 
79 79
                 return $value;
80 80
             })
81
-            ->setNormalizer('attr', function (Options $options, $value) {
81
+            ->setNormalizer('attr', function(Options $options, $value) {
82 82
                 $position = $options->offsetGet('position');
83 83
 
84 84
                 if (!key_exists('class', $value)) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
                 return $value;
98 98
             })
99
-            ->setNormalizer('item_css_class', function (Options $options, $value) {
99
+            ->setNormalizer('item_css_class', function(Options $options, $value) {
100 100
                 $position = $options->offsetGet('position');
101 101
 
102 102
                 if (!$value) {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
                 return trim($value);
115 115
             })
116
-            ->setNormalizer('brand', function (Options $options, $value) {
116
+            ->setNormalizer('brand', function(Options $options, $value) {
117 117
                 if (null === $value && 'horizontal' === $options->offsetGet('position')) {
118 118
                     $value = $this->applicationName;
119 119
                 }
Please login to merge, or discard this patch.