@@ -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 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | 'template' => '@LAGAdmin/Field/actionCollection.html.twig', |
| 39 | 39 | 'actions' => [], |
| 40 | 40 | ]) |
| 41 | - ->setNormalizer('actions', function (Options $options, $value) use ($actionConfiguration, $defaultActions) { |
|
| 41 | + ->setNormalizer('actions', function(Options $options, $value) use ($actionConfiguration, $defaultActions) { |
|
| 42 | 42 | if (!is_array($value) || 0 === count($value)) { |
| 43 | 43 | $value = $defaultActions; |
| 44 | 44 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | '_self', |
| 110 | 110 | '_blank', |
| 111 | 111 | ]) |
| 112 | - ->setNormalizer('route', function (Options $options, $value) use ($actionConfiguration) { |
|
| 112 | + ->setNormalizer('route', function(Options $options, $value) use ($actionConfiguration) { |
|
| 113 | 113 | // route or url should be defined |
| 114 | 114 | if (!$value && !$options->offsetGet('url') && !$options->offsetGet('admin')) { |
| 115 | 115 | throw new InvalidOptionsException( |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | return $value; |
| 129 | 129 | }) |
| 130 | - ->setNormalizer('admin', function (Options $options, $value) { |
|
| 130 | + ->setNormalizer('admin', function(Options $options, $value) { |
|
| 131 | 131 | // if a Admin is defined, an Action should be defined too |
| 132 | 132 | if ($value && !$options->offsetGet('action')) { |
| 133 | 133 | throw new InvalidOptionsException( |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | return $value; |
| 139 | 139 | }) |
| 140 | - ->setNormalizer('parameters', function (Options $options, $values) { |
|
| 140 | + ->setNormalizer('parameters', function(Options $options, $values) { |
|
| 141 | 141 | $cleanedValues = []; |
| 142 | 142 | |
| 143 | 143 | foreach ($values as $name => $method) { |
@@ -82,7 +82,7 @@ |
||
| 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); |
@@ -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', |
@@ -119,7 +119,7 @@ |
||
| 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); |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | if ($this->applicationConfiguration->getParameter('enable_homepage')) { |
| 135 | - $route = new Route('/', ['_controller' => HomeAction::class,], []); |
|
| 135 | + $route = new Route('/', ['_controller' => HomeAction::class, ], []); |
|
| 136 | 136 | $routes->add('lag.admin.homepage', $route); |
| 137 | 137 | } |
| 138 | 138 | } |