@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | $application = new \Mezon\Application\Application(); |
209 | 209 | |
210 | - $application->fly = function () { |
|
210 | + $application->fly = function() { |
|
211 | 211 | return 'OK!'; |
212 | 212 | }; |
213 | 213 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | // setup |
233 | 233 | $application = new \Mezon\Application\Application(); |
234 | 234 | |
235 | - $application->fly = function () { |
|
235 | + $application->fly = function() { |
|
236 | 236 | return 'OK!'; |
237 | 237 | }; |
238 | 238 |
@@ -274,7 +274,7 @@ |
||
274 | 274 | { |
275 | 275 | $method = 'action' . basename($path, '.json'); |
276 | 276 | |
277 | - $this->$method = function () use ($path): array { |
|
277 | + $this->$method = function() use ($path): array { |
|
278 | 278 | $result = []; |
279 | 279 | $views = []; |
280 | 280 | $presenter = null; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public static function ignoreKey(): callable |
15 | 15 | { |
16 | - return function (): void { |
|
16 | + return function(): void { |
|
17 | 17 | // do nothind |
18 | 18 | }; |
19 | 19 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public static function resetLayout(HtmlTemplate $template, string $value): callable |
30 | 30 | { |
31 | - return function () use ($template, $value) { |
|
31 | + return function() use ($template, $value) { |
|
32 | 32 | $template->resetLayout($value); |
33 | 33 | }; |
34 | 34 | } |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | // #0, default behaviour, layout is not set |
38 | 38 | [ |
39 | 39 | 'from-config', |
40 | - function (string $result) { |
|
40 | + function(string $result) { |
|
41 | 41 | $this->assertCommonCall($result, '<!-- index1 -->'); |
42 | 42 | } |
43 | 43 | ], |
44 | 44 | // #1, default behaviour, layout is set, no name is defined for the other-view |
45 | 45 | [ |
46 | 46 | 'from-config2', |
47 | - function (string $result) { |
|
47 | + function(string $result) { |
|
48 | 48 | $this->assertCommonCall($result, '<!-- index2 -->'); |
49 | 49 | |
50 | 50 | $this->assertTrue(TestingView::$defaultViewWasRendered); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | // #2, inherit from from-config2 |
54 | 54 | [ |
55 | 55 | 'from-config3', |
56 | - function (string $result) { |
|
56 | + function(string $result) { |
|
57 | 57 | $this->assertCommonCall($result, '<!-- index1 -->'); |
58 | 58 | |
59 | 59 | $this->assertTrue(TestingView::$defaultViewWasRendered); |
@@ -176,35 +176,35 @@ |
||
176 | 176 | { |
177 | 177 | $presenter = new TestingPresenter(new View(), 'Result'); |
178 | 178 | return [ |
179 | - [ // #0 testing presenter |
|
180 | - function (): TestCommonApplication { |
|
179 | + [// #0 testing presenter |
|
180 | + function(): TestCommonApplication { |
|
181 | 181 | return new TestCommonApplication(); |
182 | 182 | }, |
183 | 183 | $presenter, |
184 | - function (array $params) { |
|
184 | + function(array $params) { |
|
185 | 185 | $this->assertTrue($params[0]->wasCalled); |
186 | 186 | } |
187 | 187 | ], |
188 | - [ // #1 testing action message setup |
|
189 | - function (): TestCommonApplication { |
|
188 | + [// #1 testing action message setup |
|
189 | + function(): TestCommonApplication { |
|
190 | 190 | $_GET['action-message'] = 'test-error'; |
191 | 191 | return new TestCommonApplication(); |
192 | 192 | }, |
193 | 193 | $presenter, |
194 | - function (array $params): void { |
|
194 | + function(array $params): void { |
|
195 | 195 | $this->assertEquals('error', $params[1]->getTemplate() |
196 | 196 | ->getPageVar('action-message')); |
197 | 197 | } |
198 | 198 | ], |
199 | - [ // #2 no file with the messages |
|
200 | - function (): TestCommonApplication { |
|
199 | + [// #2 no file with the messages |
|
200 | + function(): TestCommonApplication { |
|
201 | 201 | $_GET['action-message'] = 'test-error'; |
202 | 202 | $application = new TestCommonApplication(); |
203 | 203 | $application->hasMessages = false; |
204 | 204 | return $application; |
205 | 205 | }, |
206 | 206 | $presenter, |
207 | - function (array $params): void { |
|
207 | + function(array $params): void { |
|
208 | 208 | $this->assertEquals('', $params[1]->getTemplate() |
209 | 209 | ->getPageVar('action-message')); |
210 | 210 | } |