@@ -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 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // #0, default behaviour, layout is not set, extra view variable is set |
| 38 | 38 | [ |
| 39 | 39 | 'from-config', |
| 40 | - function (string $result) { |
|
| 40 | + function(string $result) { |
|
| 41 | 41 | $this->assertCommonCall($result, '<!-- index1 -->'); |
| 42 | 42 | $this->assertStringContainsString('someVarValue', $result); |
| 43 | 43 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | // #1, default behaviour, layout is set, no name is defined for the other-view |
| 46 | 46 | [ |
| 47 | 47 | 'from-config2', |
| 48 | - function (string $result) { |
|
| 48 | + function(string $result) { |
|
| 49 | 49 | $this->assertCommonCall($result, '<!-- index2 -->'); |
| 50 | 50 | |
| 51 | 51 | $this->assertTrue(TestingView::$defaultViewWasRendered); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // #2, inherit from from-config2 |
| 55 | 55 | [ |
| 56 | 56 | 'from-config3', |
| 57 | - function (string $result) { |
|
| 57 | + function(string $result) { |
|
| 58 | 58 | $this->assertCommonCall($result, '<!-- index1 -->'); |
| 59 | 59 | |
| 60 | 60 | $this->assertTrue(TestingView::$defaultViewWasRendered); |
@@ -298,7 +298,7 @@ |
||
| 298 | 298 | { |
| 299 | 299 | $method = 'action' . basename($path, '.json'); |
| 300 | 300 | |
| 301 | - $this->$method = function () use ($path): array { |
|
| 301 | + $this->$method = function() use ($path): array { |
|
| 302 | 302 | $result = []; |
| 303 | 303 | |
| 304 | 304 | // TODO extract method and put in the ActionBuilder |
@@ -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 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | foreach ($value as $configKey => $configValue) { |
| 102 | - if (! in_array($configKey, [ |
|
| 102 | + if (!in_array($configKey, [ |
|
| 103 | 103 | 'class', |
| 104 | 104 | 'name', |
| 105 | 105 | 'placeholder' |
@@ -17,36 +17,36 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $presenter = new TestingPresenter(new View(), 'Result'); |
| 19 | 19 | return [ |
| 20 | - [ // #0 testing presenter |
|
| 21 | - function (): TestCommonApplication { |
|
| 20 | + [// #0 testing presenter |
|
| 21 | + function(): TestCommonApplication { |
|
| 22 | 22 | unset($_GET['action-message']); |
| 23 | 23 | return new TestCommonApplication(); |
| 24 | 24 | }, |
| 25 | 25 | $presenter, |
| 26 | - function (array $params) { |
|
| 26 | + function(array $params) { |
|
| 27 | 27 | $this->assertTrue($params[0]->wasCalled); |
| 28 | 28 | } |
| 29 | 29 | ], |
| 30 | - [ // #1 testing action message setup |
|
| 31 | - function (): TestCommonApplication { |
|
| 30 | + [// #1 testing action message setup |
|
| 31 | + function(): TestCommonApplication { |
|
| 32 | 32 | $_GET['action-message'] = 'test-error'; |
| 33 | 33 | return new TestCommonApplication(); |
| 34 | 34 | }, |
| 35 | 35 | $presenter, |
| 36 | - function (array $params): void { |
|
| 36 | + function(array $params): void { |
|
| 37 | 37 | $this->assertEquals('error', $params[1]->getTemplate() |
| 38 | 38 | ->getPageVar('action-message')); |
| 39 | 39 | } |
| 40 | 40 | ], |
| 41 | - [ // #2 no file with the messages |
|
| 42 | - function (): TestCommonApplication { |
|
| 41 | + [// #2 no file with the messages |
|
| 42 | + function(): TestCommonApplication { |
|
| 43 | 43 | $_GET['action-message'] = 'test-error'; |
| 44 | 44 | $application = new TestCommonApplication(); |
| 45 | 45 | $application->hasMessages = false; |
| 46 | 46 | return $application; |
| 47 | 47 | }, |
| 48 | 48 | $presenter, |
| 49 | - function (array $params): void { |
|
| 49 | + function(array $params): void { |
|
| 50 | 50 | $this->assertEquals('', $params[1]->getTemplate() |
| 51 | 51 | ->getPageVar('action-message')); |
| 52 | 52 | } |