@@ -34,7 +34,7 @@ |
||
34 | 34 | } |
35 | 35 | // check if they exists in entities displayed and if checkbox is checked |
36 | 36 | foreach ($batchItems as $name => $batchItem) { |
37 | - $batchId = (int)str_replace('batch_', '', $name); |
|
37 | + $batchId = (int) str_replace('batch_', '', $name); |
|
38 | 38 | |
39 | 39 | if (array_key_exists($batchId, $cleanData['labels']) && $batchItem === true) { |
40 | 40 | $cleanData['ids'][] = $batchId; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | ] |
33 | 33 | ]) |
34 | 34 | ; |
35 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
35 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
36 | 36 | $data = $event->getData(); |
37 | 37 | $form = $event->getForm(); |
38 | 38 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $path = str_replace('{action}', $action->getName(), $path); |
94 | 94 | // by default, generic controller |
95 | 95 | $defaults = [ |
96 | - '_controller' => $admin->getConfiguration()->getControllerName().':'.$action->getName(), |
|
96 | + '_controller' => $admin->getConfiguration()->getControllerName() . ':' . $action->getName(), |
|
97 | 97 | '_admin' => $admin->getName(), |
98 | 98 | '_action' => $action->getName(), |
99 | 99 | ]; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | $array = explode('\\', $namespace); |
137 | 137 | $path = array_pop($array); |
138 | - $path = strtolower(substr($path, 0, 1)).substr($path, 1); |
|
138 | + $path = strtolower(substr($path, 0, 1)) . substr($path, 1); |
|
139 | 139 | |
140 | 140 | return $path; |
141 | 141 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | // test with no configuration |
82 | 82 | $adminFactory = $this->mockAdminFactory(); |
83 | 83 | // unknow admin not exists, it should throw an exception |
84 | - $this->assertExceptionRaised('Exception', function () use ($adminFactory) { |
|
84 | + $this->assertExceptionRaised('Exception', function() use ($adminFactory) { |
|
85 | 85 | $adminFactory->getAdmin('unknown_admin'); |
86 | 86 | }); |
87 | 87 | // test with configurations samples |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function registerContainerConfiguration(LoaderInterface $loader) |
24 | 24 | { |
25 | - $loader->load(__DIR__.'/config/config_test.yml'); |
|
25 | + $loader->load(__DIR__ . '/config/config_test.yml'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getCacheDir() |
32 | 32 | { |
33 | - $cacheDir = sys_get_temp_dir().'/phpunit/cache'; |
|
33 | + $cacheDir = sys_get_temp_dir() . '/phpunit/cache'; |
|
34 | 34 | |
35 | 35 | if (!is_dir($cacheDir)) { |
36 | 36 | mkdir($cacheDir, 0777, true); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function getLogDir() |
46 | 46 | { |
47 | - $logDir = sys_get_temp_dir().'/phpunit/logs'; |
|
47 | + $logDir = sys_get_temp_dir() . '/phpunit/logs'; |
|
48 | 48 | |
49 | 49 | if (!is_dir($logDir)) { |
50 | 50 | mkdir($logDir, 0777, true); |
@@ -4,13 +4,13 @@ discard block |
||
4 | 4 | |
5 | 5 | //use Symfony\Component\HttpFoundation\Request; |
6 | 6 | |
7 | -if (!is_file($loaderFile = __DIR__.'/../vendor/autoload.php') && !is_file($loaderFile = __DIR__.'/../../../../../../vendor/autoload.php')) { |
|
7 | +if (!is_file($loaderFile = __DIR__ . '/../vendor/autoload.php') && !is_file($loaderFile = __DIR__ . '/../../../../../../vendor/autoload.php')) { |
|
8 | 8 | throw new LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); |
9 | 9 | } |
10 | 10 | |
11 | 11 | /** @var \Composer\Autoload\ClassLoader $loader */ |
12 | 12 | $loader = require $loaderFile; |
13 | -$loader->add('', __DIR__.'/src/'); |
|
13 | +$loader->add('', __DIR__ . '/src/'); |
|
14 | 14 | $loader->register(); |
15 | 15 | |
16 | 16 | //require_once __DIR__ . '/src/Entity/TestEntity.php'; |
@@ -30,4 +30,4 @@ discard block |
||
30 | 30 | //$loader = require_once __DIR__.'/app/bootstrap.php.cache'; |
31 | 31 | |
32 | 32 | //require_once __DIR__ . '/src/Test/TestBundle/TestTestBundle.php'; |
33 | -require_once __DIR__.'/app/AppKernel.php'; |
|
33 | +require_once __DIR__ . '/app/AppKernel.php'; |
@@ -358,7 +358,7 @@ |
||
358 | 358 | } |
359 | 359 | |
360 | 360 | /** |
361 | - * @return array |
|
361 | + * @return integer[] |
|
362 | 362 | */ |
363 | 363 | public function getActionNames() |
364 | 364 | { |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $hooks = []; |
250 | 250 | |
251 | 251 | foreach ($fields as $fieldName) { |
252 | - $exporter->addHook(function ($fieldValue) { |
|
252 | + $exporter->addHook(function($fieldValue) { |
|
253 | 253 | // if field is an array |
254 | 254 | if (is_array($fieldValue)) { |
255 | 255 | $value = recursiveImplode(', ', $fieldValue); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $this->forward404Unless( |
295 | 295 | $admin->isActionGranted($admin->getCurrentAction()->getName(), $roles), |
296 | 296 | sprintf('User with roles %s not allowed for action "%s"', |
297 | - implode(', ', array_map(function (Role $role) { |
|
297 | + implode(', ', array_map(function(Role $role) { |
|
298 | 298 | return $role->getRole(); |
299 | 299 | }, $roles)), |
300 | 300 | $admin->getCurrentAction()->getName() |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function render($value) |
28 | 28 | { |
29 | 29 | if (!is_array($value) && !($value instanceof Traversable)) { |
30 | - throw new Exception('Value should be an array instead of '.gettype($value)); |
|
30 | + throw new Exception('Value should be an array instead of ' . gettype($value)); |
|
31 | 31 | } |
32 | 32 | if ($value instanceof Collection) { |
33 | 33 | $value = $value->toArray(); |