@@ -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 | } |
@@ -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; |
@@ -1,5 +1,5 @@ discard block |
||
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) |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | protected function getCanHandler($policy, $action) |
95 | 95 | { |
96 | - $method = 'can' . ucfirst($action); |
|
96 | + $method = 'can'.ucfirst($action); |
|
97 | 97 | |
98 | 98 | if (!method_exists($policy, $method) && !method_exists($policy, '__call')) { |
99 | 99 | throw (new MissingMethodException())->setMessageVars([$method, $action, get_class($policy)]); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | protected function getScopeHandler($policy, $action): callable |
114 | 114 | { |
115 | - $method = 'scope' . ucfirst($action); |
|
115 | + $method = 'scope'.ucfirst($action); |
|
116 | 116 | |
117 | 117 | if (!method_exists($policy, $method)) { |
118 | 118 | throw (new MissingMethodException())->setMessageVars([$method, $action, get_class($policy)]); |