Completed
Pull Request — master (#95)
by Arnaud
18:01 queued 15:25
created
src/Configuration/ApplicationConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             ->setAllowedTypes('routing_name_pattern', 'string')
80 80
             ->setAllowedTypes('routing_url_pattern', 'string')
81 81
             ->setAllowedTypes('page_parameter', 'string')
82
-            ->setNormalizer('routing_name_pattern', function (Options $options, $value) {
82
+            ->setNormalizer('routing_name_pattern', function(Options $options, $value) {
83 83
                 if (strstr($value, '{admin}') === false) {
84 84
                     throw new InvalidOptionsException(
85 85
                         'Admin routing configuration pattern name should contains the {admin} placeholder'
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
                 return $value;
95 95
             })
96
-            ->setNormalizer('routing_url_pattern', function (Options $options, $value) {
96
+            ->setNormalizer('routing_url_pattern', function(Options $options, $value) {
97 97
                 if (strstr($value, '{admin}') === false) {
98 98
                     throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder');
99 99
                 }
Please login to merge, or discard this patch.
src/Configuration/ActionConfiguration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     private function getFieldsNormalizer()
166 166
     {
167
-        return function (Options $options, $fields) {
167
+        return function(Options $options, $fields) {
168 168
             $normalizedFields = [];
169 169
 
170 170
             foreach ($fields as $name => $field) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     private function getOrderNormalizer()
189 189
     {
190
-        return function (Options $options, $order) {
190
+        return function(Options $options, $order) {
191 191
             foreach ($order as $field => $sort) {
192 192
 
193 193
                 if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     private function getLoadStrategyNormalizer()
213 213
     {
214
-        return function (Options $options, $value) {
214
+        return function(Options $options, $value) {
215 215
             if (!$value) {
216 216
                 if ($this->actionName == 'create') {
217 217
                     $value = LAGAdminBundle::LOAD_STRATEGY_NONE;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     private function getMenuNormalizer()
236 236
     {
237
-        return function (Options $options, $menus) {
237
+        return function(Options $options, $menus) {
238 238
             // set default to an array
239 239
             if ($menus === false) {
240 240
                 $menus = [];
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      */
253 253
     private function getCriteriaNormalizer()
254 254
     {
255
-        return function (Options $options, $value) {
255
+        return function(Options $options, $value) {
256 256
             if (!$value) {
257 257
                 $idActions = [
258 258
                     'edit',
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     private function getBatchNormalizer()
304 304
     {
305
-        return function (Options $options, $batch) {
305
+        return function(Options $options, $batch) {
306 306
             // if batch is not activated, no more checks should be done
307 307
             if ($batch === false) {
308 308
                 return $batch;
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
      */
350 350
     private function getFiltersNormalizer()
351 351
     {
352
-        return function (Options $options, $filters) {
352
+        return function(Options $options, $filters) {
353 353
             if (!is_array($filters)) {
354 354
                 return [];
355 355
             }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
     private function getRouteDefaultNormalizer()
392 392
     {
393
-        return function (Options $options, $value) {
393
+        return function(Options $options, $value) {
394 394
             if (!is_array($value)) {
395 395
                 $value = [];
396 396
             }
Please login to merge, or discard this patch.
src/Configuration/AdminConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Bridge/Doctrine/Orm/DataProvider/OrmDataProvider.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
         if ('pagerfanta' === $configuration->getParameter('pager')) {
70 70
             $pageParameter = $configuration->getParameter('page_parameter');
71 71
             $request = $this->requestStack->getCurrentRequest();
72
-            $page = (int)$request->get($pageParameter, 1);
72
+            $page = (int) $request->get($pageParameter, 1);
73 73
 
74 74
             $adapter = new DoctrineORMAdapter($queryBuilder);
75 75
             $pager = new Pagerfanta($adapter);
Please login to merge, or discard this patch.
src/Event/Subscriber/AdminSubscriber.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,12 +135,10 @@
 block discarded – undo
135 135
 
136 136
         if (LAGAdminBundle::LOAD_STRATEGY_NONE === $strategy) {
137 137
             return;
138
-        }
139
-        else if (LAGAdminBundle::LOAD_STRATEGY_MULTIPLE === $strategy) {
138
+        } else if (LAGAdminBundle::LOAD_STRATEGY_MULTIPLE === $strategy) {
140 139
             $entities = $dataProvider->getCollection($admin);
141 140
             $event->setEntities($entities);
142
-        }
143
-        else if (LAGAdminBundle::LOAD_STRATEGY_UNIQUE === $strategy) {
141
+        } else if (LAGAdminBundle::LOAD_STRATEGY_UNIQUE === $strategy) {
144 142
             $requirements = $actionConfiguration->getParameter('route_requirements');
145 143
             $identifier = null;
146 144
 
Please login to merge, or discard this patch.
src/Field/LinkField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Field/MappedField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
             $value = $this->options['map'][$value];
27 27
         }
28 28
 
29
-        return (string)$value;
29
+        return (string) $value;
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
AdminBundle/DependencyInjection/CompilerPass/ResourceCompilerPassTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         $resourceCollection
17 17
             ->expects($this->once())
18 18
             ->method('addMethodCall')
19
-            ->willReturnCallback(function ($name, $parameters) {
19
+            ->willReturnCallback(function($name, $parameters) {
20 20
                 $this->assertEquals('add', $name);
21 21
                 $this->assertCount(1, $parameters);
22 22
                 $this->assertInstanceOf(Resource::class, $parameters[0]);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $compilerPass = new ResourceCompilerPass();
83 83
 
84
-        $this->assertExceptionRaised(\Exception::class, function () use ($compilerPass, $builder) {
84
+        $this->assertExceptionRaised(\Exception::class, function() use ($compilerPass, $builder) {
85 85
             $compilerPass->process($builder);
86 86
         });
87 87
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         $compilerPass = new ResourceCompilerPass();
112 112
 
113
-        $this->assertExceptionRaised(\Exception::class, function () use ($compilerPass, $builder) {
113
+        $this->assertExceptionRaised(\Exception::class, function() use ($compilerPass, $builder) {
114 114
             $compilerPass->process($builder);
115 115
         });
116 116
     }
Please login to merge, or discard this patch.
sam.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     'copy' => [],
19 19
 ];
20 20
 $eventDispatcher = new EventDispatcher();
21
-$eventDispatcher->addListener(NotificationEvent::NAME, function (NotificationEvent $event) {
21
+$eventDispatcher->addListener(NotificationEvent::NAME, function(NotificationEvent $event) {
22 22
     echo $event->getMessage()."\n";
23 23
 });
24 24
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 $builder = new TaskBuilder();
69 69
 $tasks = $builder->build($tasks);
70 70
 
71
-$normalizer = new Normalizer(realpath(__DIR__ . '/AdminBundle'));
71
+$normalizer = new Normalizer(realpath(__DIR__.'/AdminBundle'));
72 72
 $locator = new Locator($normalizer);
73 73
 
74 74
 $runner = new TaskRunner(
Please login to merge, or discard this patch.