@@ -46,7 +46,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -17,7 +17,7 @@ |
||
| 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', |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | private function getFieldsNormalizer() |
| 160 | 160 | { |
| 161 | - return function (Options $options, $fields) { |
|
| 161 | + return function(Options $options, $fields) { |
|
| 162 | 162 | $normalizedFields = []; |
| 163 | 163 | |
| 164 | 164 | foreach ($fields as $name => $field) { |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function getOrderNormalizer() |
| 182 | 182 | { |
| 183 | - return function (Options $options, $order) { |
|
| 183 | + return function(Options $options, $order) { |
|
| 184 | 184 | foreach ($order as $field => $sort) { |
| 185 | 185 | if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) { |
| 186 | 186 | throw new Exception( |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | private function getLoadStrategyNormalizer() |
| 205 | 205 | { |
| 206 | - return function (Options $options, $value) { |
|
| 206 | + return function(Options $options, $value) { |
|
| 207 | 207 | if (!$value) { |
| 208 | 208 | if ('create' == $this->actionName) { |
| 209 | 209 | $value = LAGAdminBundle::LOAD_STRATEGY_NONE; |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | private function getMenuNormalizer() |
| 228 | 228 | { |
| 229 | - return function (Options $options, $menus) { |
|
| 229 | + return function(Options $options, $menus) { |
|
| 230 | 230 | // set default to an array |
| 231 | 231 | if (false === $menus) { |
| 232 | 232 | $menus = []; |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | private function getCriteriaNormalizer() |
| 246 | 246 | { |
| 247 | - return function (Options $options, $value) { |
|
| 247 | + return function(Options $options, $value) { |
|
| 248 | 248 | if (!$value) { |
| 249 | 249 | $idActions = [ |
| 250 | 250 | 'edit', |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | */ |
| 294 | 294 | private function getFiltersNormalizer(): Closure |
| 295 | 295 | { |
| 296 | - return function (Options $options, $data) { |
|
| 296 | + return function(Options $options, $data) { |
|
| 297 | 297 | $normalizedData = []; |
| 298 | 298 | |
| 299 | 299 | foreach ($data as $name => $field) { |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | |
| 320 | 320 | private function getRouteDefaultNormalizer(): Closure |
| 321 | 321 | { |
| 322 | - return function (Options $options, $value) { |
|
| 322 | + return function(Options $options, $value) { |
|
| 323 | 323 | if (!is_array($value)) { |
| 324 | 324 | $value = []; |
| 325 | 325 | } |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | |
| 333 | 333 | private function getFormNormalizer(): Closure |
| 334 | 334 | { |
| 335 | - return function (Options $options, $value) { |
|
| 335 | + return function(Options $options, $value) { |
|
| 336 | 336 | if (null !== $value) { |
| 337 | 337 | return $value; |
| 338 | 338 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $eventDispatcher |
| 48 | 48 | ->expects($this->exactly(6)) |
| 49 | 49 | ->method('dispatch') |
| 50 | - ->willReturnCallback(function ($eventName, $event) use ($action, $form) { |
|
| 50 | + ->willReturnCallback(function($eventName, $event) use ($action, $form) { |
|
| 51 | 51 | if (Events::HANDLE_REQUEST === $eventName) { |
| 52 | 52 | /** @var AdminEvent $event */ |
| 53 | 53 | $this->assertInstanceOf(AdminEvent::class, $event); |
@@ -112,7 +112,7 @@ discard block |
||
| 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 |
||
| 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(Events::VIEW, $eventName); |
| 132 | 132 | /** @var ViewEvent $event */ |
| 133 | 133 | $this->assertInstanceOf(ViewEvent::class, $event); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $eventDispatcher |
| 179 | 179 | ->expects($this->exactly(5)) |
| 180 | 180 | ->method('dispatch') |
| 181 | - ->willReturnCallback(function ($eventName, $event) use ($action, $form) { |
|
| 181 | + ->willReturnCallback(function($eventName, $event) use ($action, $form) { |
|
| 182 | 182 | if (Events::HANDLE_REQUEST === $eventName) { |
| 183 | 183 | /** @var AdminEvent $event */ |
| 184 | 184 | $this->assertInstanceOf(AdminEvent::class, $event); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $eventDispatcher |
| 209 | 209 | ->expects($this->exactly(5)) |
| 210 | 210 | ->method('dispatch') |
| 211 | - ->willReturnCallback(function ($eventName, $event) use ($action, $form) { |
|
| 211 | + ->willReturnCallback(function($eventName, $event) use ($action, $form) { |
|
| 212 | 212 | if (Events::HANDLE_REQUEST === $eventName) { |
| 213 | 213 | /** @var AdminEvent $event */ |
| 214 | 214 | $this->assertInstanceOf(AdminEvent::class, $event); |
@@ -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 |
@@ -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); |