@@ -20,7 +20,8 @@ |
||
20 | 20 | |
21 | 21 | protected static function filter($v) |
22 | 22 | { |
23 | - if (is_array($v)) { |
|
23 | + if (is_array($v)) |
|
24 | + { |
|
24 | 25 | throw new RuntimeException("can't be array"); |
25 | 26 | } |
26 | 27 |
@@ -20,7 +20,8 @@ |
||
20 | 20 | |
21 | 21 | protected function isNullable(string $field): bool |
22 | 22 | { |
23 | - if (parent::isNullable($field)) { |
|
23 | + if (parent::isNullable($field)) |
|
24 | + { |
|
24 | 25 | return true; |
25 | 26 | } |
26 | 27 |
@@ -43,11 +43,13 @@ |
||
43 | 43 | */ |
44 | 44 | protected function mapDirectories(array $directories): array |
45 | 45 | { |
46 | - if (!isset($directories['root'])) { |
|
46 | + if (!isset($directories['root'])) |
|
47 | + { |
|
47 | 48 | throw new BootException('Missing required directory `root`.'); |
48 | 49 | } |
49 | 50 | |
50 | - if (!isset($directories['app'])) { |
|
51 | + if (!isset($directories['app'])) |
|
52 | + { |
|
51 | 53 | $directories['app'] = $directories['root'] . '/app/'; |
52 | 54 | } |
53 | 55 |
@@ -43,11 +43,13 @@ |
||
43 | 43 | */ |
44 | 44 | protected function mapDirectories(array $directories): array |
45 | 45 | { |
46 | - if (!isset($directories['root'])) { |
|
46 | + if (!isset($directories['root'])) |
|
47 | + { |
|
47 | 48 | throw new BootException('Missing required directory `root`.'); |
48 | 49 | } |
49 | 50 | |
50 | - if (!isset($directories['app'])) { |
|
51 | + if (!isset($directories['app'])) |
|
52 | + { |
|
51 | 53 | $directories['app'] = $directories['root'] . '/app/'; |
52 | 54 | } |
53 | 55 |
@@ -26,7 +26,8 @@ |
||
26 | 26 | |
27 | 27 | public function perform(): void |
28 | 28 | { |
29 | - switch ($this->argument('helper')) { |
|
29 | + switch ($this->argument('helper')) |
|
30 | + { |
|
30 | 31 | case 'verbose': |
31 | 32 | $this->write($this->isVerbose() ? 'true' : 'false'); |
32 | 33 | break; |
@@ -18,7 +18,8 @@ |
||
18 | 18 | { |
19 | 19 | public function getActor(TokenInterface $token): ?object |
20 | 20 | { |
21 | - if ($token->getPayload()['ok']) { |
|
21 | + if ($token->getPayload()['ok']) |
|
22 | + { |
|
22 | 23 | return new \stdClass(); |
23 | 24 | } |
24 | 25 |
@@ -18,7 +18,8 @@ |
||
18 | 18 | { |
19 | 19 | public function getActor(TokenInterface $token): ?object |
20 | 20 | { |
21 | - if ($token->getID() === 'ok') { |
|
21 | + if ($token->getID() === 'ok') |
|
22 | + { |
|
22 | 23 | return new \stdClass(); |
23 | 24 | } |
24 | 25 |
@@ -18,7 +18,8 @@ |
||
18 | 18 | { |
19 | 19 | public function load(string $id): ?TokenInterface |
20 | 20 | { |
21 | - if ($id === 'bad') { |
|
21 | + if ($id === 'bad') |
|
22 | + { |
|
22 | 23 | return null; |
23 | 24 | } |
24 | 25 |
@@ -43,9 +43,12 @@ discard block |
||
43 | 43 | |
44 | 44 | $http->setHandler( |
45 | 45 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
46 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
46 | + if ($request->getAttribute('authContext')->getToken() === null) |
|
47 | + { |
|
47 | 48 | echo 'no token'; |
48 | - } else { |
|
49 | + } |
|
50 | + else |
|
51 | + { |
|
49 | 52 | echo $request->getAttribute('authContext')->getToken()->getID(); |
50 | 53 | echo ':'; |
51 | 54 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |
@@ -67,9 +70,12 @@ discard block |
||
67 | 70 | |
68 | 71 | $http->setHandler( |
69 | 72 | static function (ServerRequestInterface $request, ResponseInterface $response): void { |
70 | - if ($request->getAttribute('authContext')->getToken() === null) { |
|
73 | + if ($request->getAttribute('authContext')->getToken() === null) |
|
74 | + { |
|
71 | 75 | echo 'no token'; |
72 | - } else { |
|
76 | + } |
|
77 | + else |
|
78 | + { |
|
73 | 79 | echo $request->getAttribute('authContext')->getToken()->getID(); |
74 | 80 | echo ':'; |
75 | 81 | echo json_encode($request->getAttribute('authContext')->getToken()->getPayload()); |