@@ -69,7 +69,7 @@ |
||
| 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 |
@@ -27,7 +27,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -34,7 +34,7 @@ |
||
| 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 | }) |
@@ -89,7 +89,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -25,7 +25,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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) { |
@@ -103,7 +103,7 @@ discard block |
||
| 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 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function testCreateView(string $actionName) |
| 117 | 117 | { |
| 118 | - list($subscriber, , $viewFactory) = $this->createSubscriber(); |
|
| 118 | + list($subscriber,, $viewFactory) = $this->createSubscriber(); |
|
| 119 | 119 | $view = $this->createMock(ViewInterface::class); |
| 120 | 120 | |
| 121 | 121 | $actionConfiguration = $this->createMock(ActionConfiguration::class); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | public function testCreateViewWithRedirection() |
| 209 | 209 | { |
| 210 | 210 | $actionName = 'edit'; |
| 211 | - list($subscriber, , $viewFactory) = $this->createSubscriber(); |
|
| 211 | + list($subscriber,, $viewFactory) = $this->createSubscriber(); |
|
| 212 | 212 | $view = $this->createMock(ViewInterface::class); |
| 213 | 213 | |
| 214 | 214 | $actionConfiguration = $this->createMock(ActionConfiguration::class); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | public function testLoadEntitiesWithMultipleStrategy() |
| 360 | 360 | { |
| 361 | - list($subscriber, , , $dataProviderFactory, , , ,) = $this->createSubscriber(); |
|
| 361 | + list($subscriber,,, $dataProviderFactory,,,,) = $this->createSubscriber(); |
|
| 362 | 362 | |
| 363 | 363 | $actionConfiguration = $this->createMock(ActionConfiguration::class); |
| 364 | 364 | $actionConfiguration |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | */ |
| 429 | 429 | public function testLoadEntitiesWithUniqueStrategy() |
| 430 | 430 | { |
| 431 | - list($subscriber, , , $dataProviderFactory) = $this->createSubscriber(); |
|
| 431 | + list($subscriber,,, $dataProviderFactory) = $this->createSubscriber(); |
|
| 432 | 432 | |
| 433 | 433 | $actionConfiguration = $this->createMock(ActionConfiguration::class); |
| 434 | 434 | $actionConfiguration |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | */ |
| 502 | 502 | public function testLoadEntitiesWithoutIdentifier() |
| 503 | 503 | { |
| 504 | - list($subscriber, , , $dataProviderFactory) = $this->createSubscriber(); |
|
| 504 | + list($subscriber,,, $dataProviderFactory) = $this->createSubscriber(); |
|
| 505 | 505 | |
| 506 | 506 | $actionConfiguration = $this->createMock(ActionConfiguration::class); |
| 507 | 507 | $actionConfiguration |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | $request = new Request(); |
| 559 | 559 | $event = new EntityEvent($admin, $request); |
| 560 | 560 | |
| 561 | - $this->assertExceptionRaised(Exception::class, function () use ($subscriber, $event) { |
|
| 561 | + $this->assertExceptionRaised(Exception::class, function() use ($subscriber, $event) { |
|
| 562 | 562 | $subscriber->loadEntities($event); |
| 563 | 563 | }); |
| 564 | 564 | } |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | */ |
| 569 | 569 | public function testSaveEntity() |
| 570 | 570 | { |
| 571 | - list($subscriber, , , $dataProviderFactory, , $session, $translator) = $this->createSubscriber(); |
|
| 571 | + list($subscriber,,, $dataProviderFactory,, $session, $translator) = $this->createSubscriber(); |
|
| 572 | 572 | |
| 573 | 573 | $adminConfiguration = $this->createMock(AdminConfiguration::class); |
| 574 | 574 | $adminConfiguration |