@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
5 | 5 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
5 | 5 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
5 | 5 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
5 | 5 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) |
5 | 5 | * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
@@ -58,9 +58,9 @@ |
||
58 | 58 | $service = ($request->getAttribute($this->authorizationAttribute)); |
59 | 59 | |
60 | 60 | if (!$service instanceof AuthorizationServiceInterface) { |
61 | - $errorMessage = __CLASS__ . ' could not find the authorization service in the request attribute. ' . |
|
62 | - 'Make sure you added the AuthorizationMiddleware before this middleware or that you ' . |
|
63 | - 'somehow else added the service to the requests `' . $this->authorizationAttribute . '` attribute.'; |
|
61 | + $errorMessage = __CLASS__.' could not find the authorization service in the request attribute. '. |
|
62 | + 'Make sure you added the AuthorizationMiddleware before this middleware or that you '. |
|
63 | + 'somehow else added the service to the requests `'.$this->authorizationAttribute.'` attribute.'; |
|
64 | 64 | |
65 | 65 | throw new RuntimeException($errorMessage); |
66 | 66 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $url = $options['url']; |
66 | 66 | if ($options['queryParam'] !== null) { |
67 | - $url['?'][$options['queryParam']] = (string)$request->getUri(); |
|
67 | + $url['?'][$options['queryParam']] = (string) $request->getUri(); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | return Router::url($url); |
@@ -93,11 +93,11 @@ |
||
93 | 93 | { |
94 | 94 | $url = $options['url']; |
95 | 95 | if ($options['queryParam'] !== null && $request->getMethod() === 'GET') { |
96 | - $query = urlencode($options['queryParam']) . '=' . urlencode($request->getRequestTarget()); |
|
96 | + $query = urlencode($options['queryParam']).'='.urlencode($request->getRequestTarget()); |
|
97 | 97 | if (strpos($url, '?') !== false) { |
98 | - $query = '&' . $query; |
|
98 | + $query = '&'.$query; |
|
99 | 99 | } else { |
100 | - $query = '?' . $query; |
|
100 | + $query = '?'.$query; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $url .= $query; |
@@ -118,7 +118,7 @@ |
||
118 | 118 | } |
119 | 119 | } catch (Exception $exception) { |
120 | 120 | $handler = $this->getHandler(); |
121 | - $response = $handler->handle($exception, $request, $response, (array)$this->unauthorizedHandler); |
|
121 | + $response = $handler->handle($exception, $request, $response, (array) $this->unauthorizedHandler); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | return $response; |