@@ -76,7 +76,7 @@ |
||
| 76 | 76 | null, |
| 77 | 77 | 'pagerfanta', |
| 78 | 78 | ]) |
| 79 | - ->setNormalizer('actions', function (Options $options, $actions) { |
|
| 79 | + ->setNormalizer('actions', function(Options $options, $actions) { |
|
| 80 | 80 | $normalizedActions = []; |
| 81 | 81 | $addBatchAction = false; |
| 82 | 82 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | '_self', |
| 47 | 47 | '_blank', |
| 48 | 48 | ]) |
| 49 | - ->setNormalizer('route', function (Options $options, $value) use ($actionConfiguration) { |
|
| 49 | + ->setNormalizer('route', function(Options $options, $value) use ($actionConfiguration) { |
|
| 50 | 50 | // route or url should be defined |
| 51 | 51 | if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) { |
| 52 | 52 | throw new InvalidOptionsException( |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | return $value; |
| 66 | 66 | }) |
| 67 | - ->setNormalizer('admin', function (Options $options, $value) { |
|
| 67 | + ->setNormalizer('admin', function(Options $options, $value) { |
|
| 68 | 68 | // if a Admin is defined, an Action should be defined too |
| 69 | 69 | if ($value && !$options->offsetGet('action')) { |
| 70 | 70 | throw new InvalidOptionsException( |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | return $value; |
| 76 | 76 | }) |
| 77 | - ->setNormalizer('parameters', function (Options $options, $values) { |
|
| 77 | + ->setNormalizer('parameters', function(Options $options, $values) { |
|
| 78 | 78 | $cleanedValues = []; |
| 79 | 79 | |
| 80 | 80 | foreach ($values as $name => $method) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | 'template' => '@LAGAdmin/Field/actionCollection.html.twig', |
| 40 | 40 | 'actions' => [], |
| 41 | 41 | ]) |
| 42 | - ->setNormalizer('actions', function (Options $options, $value) use ($actionConfiguration, $defaultActions) { |
|
| 42 | + ->setNormalizer('actions', function(Options $options, $value) use ($actionConfiguration, $defaultActions) { |
|
| 43 | 43 | if (!is_array($value) || 0 === count($value)) { |
| 44 | 44 | $value = [ |
| 45 | 45 | 'edit' => [], |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | '_self', |
| 139 | 139 | '_blank', |
| 140 | 140 | ]) |
| 141 | - ->setNormalizer('route', function (Options $options, $value) use ($actionConfiguration) { |
|
| 141 | + ->setNormalizer('route', function(Options $options, $value) use ($actionConfiguration) { |
|
| 142 | 142 | // route or url should be defined |
| 143 | 143 | if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) { |
| 144 | 144 | throw new InvalidOptionsException( |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | return $value; |
| 158 | 158 | }) |
| 159 | - ->setNormalizer('admin', function (Options $options, $value) { |
|
| 159 | + ->setNormalizer('admin', function(Options $options, $value) { |
|
| 160 | 160 | // if a Admin is defined, an Action should be defined too |
| 161 | 161 | if ($value && !$options->offsetGet('action')) { |
| 162 | 162 | throw new InvalidOptionsException( |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | return $value; |
| 168 | 168 | }) |
| 169 | - ->setNormalizer('parameters', function (Options $options, $values) { |
|
| 169 | + ->setNormalizer('parameters', function(Options $options, $values) { |
|
| 170 | 170 | $cleanedValues = []; |
| 171 | 171 | |
| 172 | 172 | foreach ($values as $name => $method) { |
@@ -23,11 +23,11 @@ |
||
| 23 | 23 | $registry->add('my.action', $action); |
| 24 | 24 | |
| 25 | 25 | // an exception SHOULD be thrown if an Action with the same has already been registered |
| 26 | - $this->assertExceptionRaised(Exception::class, function () use ($registry, $action) { |
|
| 26 | + $this->assertExceptionRaised(Exception::class, function() use ($registry, $action) { |
|
| 27 | 27 | $registry->add('my.action', $action); |
| 28 | 28 | }); |
| 29 | 29 | |
| 30 | - $this->assertExceptionRaised(Exception::class, function () use ($registry, $action) { |
|
| 30 | + $this->assertExceptionRaised(Exception::class, function() use ($registry, $action) { |
|
| 31 | 31 | $registry->get('badName'); |
| 32 | 32 | }); |
| 33 | 33 | |
@@ -239,13 +239,13 @@ |
||
| 239 | 239 | $actionRegistry |
| 240 | 240 | ); |
| 241 | 241 | |
| 242 | - $this->assertExceptionRaised(Exception::class, function () use ($actionFactory) { |
|
| 242 | + $this->assertExceptionRaised(Exception::class, function() use ($actionFactory) { |
|
| 243 | 243 | $actionFactory->getActions('test', [ |
| 244 | 244 | 'lol', |
| 245 | 245 | ]); |
| 246 | 246 | }); |
| 247 | 247 | |
| 248 | - $this->assertExceptionRaised(LogicException::class, function () use ($actionFactory) { |
|
| 248 | + $this->assertExceptionRaised(LogicException::class, function() use ($actionFactory) { |
|
| 249 | 249 | $actionFactory->getActions('test', [ |
| 250 | 250 | 'actions' => [ |
| 251 | 251 | 'my-action' => [], |
@@ -48,15 +48,15 @@ |
||
| 48 | 48 | { |
| 49 | 49 | $arrayField = new ArrayField('my-field'); |
| 50 | 50 | |
| 51 | - $this->assertExceptionRaised(\Exception::class, function () use ($arrayField) { |
|
| 51 | + $this->assertExceptionRaised(\Exception::class, function() use ($arrayField) { |
|
| 52 | 52 | $arrayField->render('a string'); |
| 53 | 53 | }); |
| 54 | 54 | |
| 55 | - $this->assertExceptionRaised(\Exception::class, function () use ($arrayField) { |
|
| 55 | + $this->assertExceptionRaised(\Exception::class, function() use ($arrayField) { |
|
| 56 | 56 | $arrayField->render(12); |
| 57 | 57 | }); |
| 58 | 58 | |
| 59 | - $this->assertExceptionRaised(\Exception::class, function () use ($arrayField) { |
|
| 59 | + $this->assertExceptionRaised(\Exception::class, function() use ($arrayField) { |
|
| 60 | 60 | $arrayField->render(new stdClass()); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $linkField = new Date('my-field'); |
| 28 | 28 | |
| 29 | - $this->assertExceptionRaised(\Exception::class, function () use ($linkField) { |
|
| 29 | + $this->assertExceptionRaised(\Exception::class, function() use ($linkField) { |
|
| 30 | 30 | $linkField->render('2017-10-05'); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $configurationFactory |
| 48 | 48 | ->expects($this->once()) |
| 49 | 49 | ->method('create') |
| 50 | - ->willReturnCallback(function ($field, $configuration) use ($actionConfiguration, $fieldConfiguration) { |
|
| 50 | + ->willReturnCallback(function($field, $configuration) use ($actionConfiguration, $fieldConfiguration) { |
|
| 51 | 51 | $this->assertInstanceOf(StringField::class, $field); |
| 52 | 52 | $this->assertEquals([ |
| 53 | 53 | 'length' => 200, |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $repository = new FakeRepository($entityManager, $metadata, TestEntity::class); |
| 56 | 56 | |
| 57 | - $this->assertExceptionRaised(\LogicException::class, function () use ($repository, $entity) { |
|
| 57 | + $this->assertExceptionRaised(\LogicException::class, function() use ($repository, $entity) { |
|
| 58 | 58 | $repository->save($entity); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $repository = new FakeRepository($entityManager, $metadata, TestEntity::class); |
| 105 | 105 | |
| 106 | - $this->assertExceptionRaised(\LogicException::class, function () use ($repository, $entity) { |
|
| 106 | + $this->assertExceptionRaised(\LogicException::class, function() use ($repository, $entity) { |
|
| 107 | 107 | $repository->delete($entity); |
| 108 | 108 | }); |
| 109 | 109 | } |