@@ -176,44 +176,44 @@ |
||
| 176 | 176 | { |
| 177 | 177 | $presenter = new TestingPresenter(new View(), 'Result'); |
| 178 | 178 | return [ |
| 179 | - [ // #0 testing controller |
|
| 180 | - function (): TestCommonApplication { |
|
| 179 | + [// #0 testing controller |
|
| 180 | + function(): TestCommonApplication { |
|
| 181 | 181 | return new TestCommonApplication(); |
| 182 | 182 | }, |
| 183 | 183 | new TestingController('Result'), |
| 184 | - function (array $params) { |
|
| 184 | + function(array $params) { |
|
| 185 | 185 | $this->assertTrue($params[0]->wasCalled); |
| 186 | 186 | } |
| 187 | 187 | ], |
| 188 | - [ // #1 testing presenter |
|
| 189 | - function (): TestCommonApplication { |
|
| 188 | + [// #1 testing presenter |
|
| 189 | + function(): TestCommonApplication { |
|
| 190 | 190 | return new TestCommonApplication(); |
| 191 | 191 | }, |
| 192 | 192 | $presenter, |
| 193 | - function (array $params) { |
|
| 193 | + function(array $params) { |
|
| 194 | 194 | $this->assertTrue($params[0]->wasCalled); |
| 195 | 195 | } |
| 196 | 196 | ], |
| 197 | - [ // #2 testing action message setup |
|
| 198 | - function (): TestCommonApplication { |
|
| 197 | + [// #2 testing action message setup |
|
| 198 | + function(): TestCommonApplication { |
|
| 199 | 199 | $_GET['action-message'] = 'test-error'; |
| 200 | 200 | return new TestCommonApplication(); |
| 201 | 201 | }, |
| 202 | 202 | $presenter, |
| 203 | - function (array $params): void { |
|
| 203 | + function(array $params): void { |
|
| 204 | 204 | $this->assertEquals('error', $params[1]->getTemplate() |
| 205 | 205 | ->getPageVar('action-message')); |
| 206 | 206 | } |
| 207 | 207 | ], |
| 208 | - [ // #3 no file with the messages |
|
| 209 | - function (): TestCommonApplication { |
|
| 208 | + [// #3 no file with the messages |
|
| 209 | + function(): TestCommonApplication { |
|
| 210 | 210 | $_GET['action-message'] = 'test-error'; |
| 211 | 211 | $application = new TestCommonApplication(); |
| 212 | 212 | $application->hasMessages = false; |
| 213 | 213 | return $application; |
| 214 | 214 | }, |
| 215 | 215 | $presenter, |
| 216 | - function (array $params): void { |
|
| 216 | + function(array $params): void { |
|
| 217 | 217 | $this->assertEquals('', $params[1]->getTemplate() |
| 218 | 218 | ->getPageVar('action-message')); |
| 219 | 219 | } |
@@ -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); |