Passed
Pull Request — master (#110)
by Arnaud
02:33
created
tests/AdminBundle/Event/Subscriber/AdminSubscriberTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $admin = $this->createMock(AdminInterface::class);
104 104
         $event = new AdminEvent($admin, $request);
105 105
 
106
-        $this->assertExceptionRaised(Exception::class, function () use ($subscriber, $event) {
106
+        $this->assertExceptionRaised(Exception::class, function() use ($subscriber, $event) {
107 107
             $subscriber->handleRequest($event);
108 108
         });
109 109
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function testCreateView()
115 115
     {
116
-        list($subscriber, , $viewFactory) = $this->createSubscriber();
116
+        list($subscriber,, $viewFactory) = $this->createSubscriber();
117 117
         $view = $this->createMock(ViewInterface::class);
118 118
 
119 119
         $actionConfiguration = $this->createMock(ActionConfiguration::class);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function testLoadEntitiesWithMultipleStrategy()
253 253
     {
254
-        list($subscriber, , , $dataProviderFactory, , , ,) = $this->createSubscriber();
254
+        list($subscriber,,, $dataProviderFactory,,,,) = $this->createSubscriber();
255 255
 
256 256
         $actionConfiguration = $this->createMock(ActionConfiguration::class);
257 257
         $actionConfiguration
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      */
322 322
     public function testLoadEntitiesWithUniqueStrategy()
323 323
     {
324
-        list($subscriber, , , $dataProviderFactory) = $this->createSubscriber();
324
+        list($subscriber,,, $dataProviderFactory) = $this->createSubscriber();
325 325
 
326 326
         $actionConfiguration = $this->createMock(ActionConfiguration::class);
327 327
         $actionConfiguration
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     public function testLoadEntitiesWithoutIdentifier()
396 396
     {
397
-        list($subscriber, , , $dataProviderFactory) = $this->createSubscriber();
397
+        list($subscriber,,, $dataProviderFactory) = $this->createSubscriber();
398 398
 
399 399
         $actionConfiguration = $this->createMock(ActionConfiguration::class);
400 400
         $actionConfiguration
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
         $request = new Request();
452 452
         $event = new EntityEvent($admin, $request);
453 453
 
454
-        $this->assertExceptionRaised(Exception::class, function () use ($subscriber, $event) {
454
+        $this->assertExceptionRaised(Exception::class, function() use ($subscriber, $event) {
455 455
             $subscriber->loadEntities($event);
456 456
         });
457 457
     }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
      */
462 462
     public function testSaveEntity()
463 463
     {
464
-        list($subscriber, , , $dataProviderFactory, , $session, $translator) = $this->createSubscriber();
464
+        list($subscriber,,, $dataProviderFactory,, $session, $translator) = $this->createSubscriber();
465 465
 
466 466
         $adminConfiguration = $this->createMock(AdminConfiguration::class);
467 467
         $adminConfiguration
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
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
     public function testBuildMenuWithoutConfiguration()
71 71
     {
72
-        list($subscriber, , $menuFactory, $eventDispatcher) = $this->createSubscriber();
72
+        list($subscriber,, $menuFactory, $eventDispatcher) = $this->createSubscriber();
73 73
         $event = new MenuEvent();
74 74
 
75 75
         $menuFactory
Please login to merge, or discard this patch.
tests/AdminBundle/Event/Subscriber/SecuritySubscriberTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function testHandleRequest()
29 29
     {
30
-        list($subscriber, , $tokenStorage, $authorizationChecker) = $this->createSubscriber([]);
30
+        list($subscriber,, $tokenStorage, $authorizationChecker) = $this->createSubscriber([]);
31 31
 
32 32
         $user = $this->createMock(UserInterface::class);
33 33
         $user
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function testHandleRequestWithSecurityDisabled()
85 85
     {
86
-        list($subscriber, , $tokenStorage) = $this->createSubscriber([
86
+        list($subscriber,, $tokenStorage) = $this->createSubscriber([
87 87
             'enable_security' => false,
88 88
         ]);
89 89
 
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(Events::MENU, $eventName);
39 39
                 $this->assertInstanceOf(MenuEvent::class, $event);
40 40
             })
Please login to merge, or discard this patch.
tests/AdminBundle/Bridge/Doctrine/ORM/DataProvider/ORMDataProviderTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $eventDispatcher
90 90
             ->expects($this->once())
91 91
             ->method('dispatch')
92
-            ->willReturnCallback(function ($eventName, $event) use ($queryBuilder, $admin) {
92
+            ->willReturnCallback(function($eventName, $event) use ($queryBuilder, $admin) {
93 93
                 $this->assertEquals(Events::DOCTRINE_ORM_FILTER, $eventName);
94 94
                 /** @var ORMFilterEvent $event */
95 95
                 $this->assertInstanceOf(ORMFilterEvent::class, $event);
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             $requestStack
218 218
         );
219 219
 
220
-        $this->assertExceptionRaised(Exception::class, function () use ($provider, $admin) {
220
+        $this->assertExceptionRaised(Exception::class, function() use ($provider, $admin) {
221 221
             $provider->get($admin, 42);
222 222
         });
223 223
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         /** @var RequestStack|MockObject $requestStack */
231 231
         $requestStack = $this->createMock(RequestStack::class);
232 232
 
233
-        $entity =new FakeEntity(42);
233
+        $entity = new FakeEntity(42);
234 234
 
235 235
         /** @var EntityManagerInterface|MockObject $entityManager */
236 236
         $entityManager = $this->createMock(EntityManagerInterface::class);
Please login to merge, or discard this patch.
src/Field/ActionCollectionField.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                 'template' => '@LAGAdmin/Field/actionCollection.html.twig',
26 26
                 'actions' => [],
27 27
             ])
28
-            ->setNormalizer('actions', function (Options $options, $value) use ($actionConfiguration) {
28
+            ->setNormalizer('actions', function(Options $options, $value) use ($actionConfiguration) {
29 29
                 if (!is_array($value) || 0 === count($value)) {
30 30
                     $value = [
31 31
                         'edit' => [],
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 '_self',
125 125
                 '_blank',
126 126
             ])
127
-            ->setNormalizer('route', function (Options $options, $value) use ($actionConfiguration) {
127
+            ->setNormalizer('route', function(Options $options, $value) use ($actionConfiguration) {
128 128
                 // route or url should be defined
129 129
                 if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) {
130 130
                     throw new InvalidOptionsException(
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
                 return $value;
144 144
             })
145
-            ->setNormalizer('admin', function (Options $options, $value) {
145
+            ->setNormalizer('admin', function(Options $options, $value) {
146 146
                 // if a Admin is defined, an Action should be defined too
147 147
                 if ($value && !$options->offsetGet('action')) {
148 148
                     throw new InvalidOptionsException(
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
                 return $value;
154 154
             })
155
-            ->setNormalizer('parameters', function (Options $options, $values) {
155
+            ->setNormalizer('parameters', function(Options $options, $values) {
156 156
                 $cleanedValues = [];
157 157
 
158 158
                 foreach ($values as $name => $method) {
Please login to merge, or discard this patch.