@@ -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(); |
@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | public function setOptions(array $options) |
85 | 85 | { |
86 | - $this->length = (int)$options['length']; |
|
86 | + $this->length = (int) $options['length']; |
|
87 | 87 | $this->replace = $options['replace']; |
88 | 88 | $this->translation = $options['translation']; |
89 | 89 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | public function testRender() |
12 | 12 | { |
13 | - $arrayField = new ArrayField (); |
|
13 | + $arrayField = new ArrayField(); |
|
14 | 14 | $arrayField->setOptions([ |
15 | 15 | 'glue' => ', ' |
16 | 16 | ]); |
@@ -81,7 +81,7 @@ discard block |
||
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 |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | // test with no configuration |
106 | 106 | $adminFactory = $this->mockAdminFactory(); |
107 | 107 | // unknow admin not exists, it should throw an exception |
108 | - $this->assertExceptionRaised('Exception', function () use ($adminFactory) { |
|
108 | + $this->assertExceptionRaised('Exception', function() use ($adminFactory) { |
|
109 | 109 | $adminFactory->getAdmin('unknown_admin'); |
110 | 110 | }); |
111 | 111 | // test with configurations samples |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | // test with no configuration |
130 | 130 | $adminFactory = $this->mockAdminFactory(); |
131 | 131 | // unknow admin not exists, it should throw an exception |
132 | - $this->assertExceptionRaised('Exception', function () use ($adminFactory) { |
|
132 | + $this->assertExceptionRaised('Exception', function() use ($adminFactory) { |
|
133 | 133 | $adminFactory->getAdmin('unknown_admin'); |
134 | 134 | }); |
135 | 135 | $dataProvider = $this->mockDataProvider(); |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | |
41 | 41 | |
42 | 42 | // with no action, handleRequest method SHOULD throw an exception |
43 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
43 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
44 | 44 | $request = new Request(); |
45 | 45 | $admin->handleRequest($request); |
46 | 46 | }); |
47 | 47 | |
48 | 48 | // with a wrong action, handleRequest method SHOULD throw an exception |
49 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
49 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
50 | 50 | $request = new Request([], [], [ |
51 | 51 | '_route_params' => [ |
52 | 52 | '_action' => 'bad_action' |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | $this->doTestAdmin($admin, $configuration, $adminName); |
76 | 76 | |
77 | 77 | // with a current action unset, checkPermissions method SHOULD throw an exception |
78 | - $this->assertExceptionRaised('Exception', function () use ($admin) { |
|
78 | + $this->assertExceptionRaised('Exception', function() use ($admin) { |
|
79 | 79 | $user = new User('JohnKrovitch', 'john1234'); |
80 | 80 | $admin->checkPermissions($user); |
81 | 81 | }); |
82 | 82 | |
83 | 83 | // with the wrong roles, checkPermissions method SHOULD throw an exception |
84 | - $this->assertExceptionRaised(NotFoundHttpException::class, function () use ($admin) { |
|
84 | + $this->assertExceptionRaised(NotFoundHttpException::class, function() use ($admin) { |
|
85 | 85 | $request = new Request([], [], [ |
86 | 86 | '_route_params' => [ |
87 | 87 | '_action' => 'custom_list' |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | }); |
94 | 94 | |
95 | 95 | // with the wrong roles, checkPermissions method SHOULD throw an exception |
96 | - $this->assertExceptionRaised(NotFoundHttpException::class, function () use ($admin) { |
|
96 | + $this->assertExceptionRaised(NotFoundHttpException::class, function() use ($admin) { |
|
97 | 97 | $request = new Request([], [], [ |
98 | 98 | '_route_params' => [ |
99 | 99 | '_action' => 'custom_list' |