@@ -139,7 +139,7 @@ |
||
| 139 | 139 | */ |
| 140 | 140 | private static function routeParams(): array |
| 141 | 141 | { |
| 142 | - return array_map(function ($param) { |
|
| 142 | + return array_map(function($param) { |
|
| 143 | 143 | return $param['value']; |
| 144 | 144 | }, route_params()); |
| 145 | 145 | } |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | public function user(): ?User |
| 135 | 135 | { |
| 136 | 136 | try { |
| 137 | - $accessToken = base64_decode((string)Request::getAuthorizationBearer()); |
|
| 137 | + $accessToken = base64_decode((string) Request::getAuthorizationBearer()); |
|
| 138 | 138 | return (new User())->setData($this->jwt->retrieve($accessToken)->fetchData()); |
| 139 | 139 | } catch (Exception $e) { |
| 140 | 140 | if (Request::hasHeader($this->keyFields[self::REFRESH_TOKEN_KEY])) { |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | if ($authAdapter == 'api') { |
| 81 | 81 | $jwt = (new JWToken()) |
| 82 | 82 | ->setLeeway(1) |
| 83 | - ->setClaims((array)config()->get('auth.claims')); |
|
| 83 | + ->setClaims((array) config()->get('auth.claims')); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | $authAdapterClassName = __NAMESPACE__ . '\\Adapters\\' . ucfirst($authAdapter) . 'Adapter'; |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | return []; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - return (array)require_once $userDependencies; |
|
| 185 | + return (array) require_once $userDependencies; |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public static function getHandler(): Logger |
| 42 | 42 | { |
| 43 | - if(is_debug_mode()) { |
|
| 43 | + if (is_debug_mode()) { |
|
| 44 | 44 | return LoggerFactory::createLogger(); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | return []; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - return array_reduce(array_keys($data), function ($headers, $key) use ($data) { |
|
| 48 | + return array_reduce(array_keys($data), function($headers, $key) use ($data) { |
|
| 49 | 49 | if (strpos($key, 'HTTP_') === 0) { |
| 50 | 50 | $formattedKey = strtolower(str_replace('_', '-', substr($key, 5))); |
| 51 | 51 | $headers[$formattedKey] = $data[$key]; |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | ]; |
| 99 | 99 | |
| 100 | 100 | if (isset($this->moduleOptions['cacheable'])) { |
| 101 | - $this->currentRoute['cache_settings']['shouldCache'] = (bool)$this->moduleOptions['cacheable']; |
|
| 101 | + $this->currentRoute['cache_settings']['shouldCache'] = (bool) $this->moduleOptions['cacheable']; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if (is_callable($params[0])) { |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function get(string $field, ?string $value): ?User; |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * Add |
|
| 34 | - * @param array $data |
|
| 35 | - * @return User |
|
| 36 | - */ |
|
| 32 | + /** |
|
| 33 | + * Add |
|
| 34 | + * @param array $data |
|
| 35 | + * @return User |
|
| 36 | + */ |
|
| 37 | 37 | public function add(array $data): User; |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $viewCache = ViewCache::getInstance(); |
| 91 | 91 | |
| 92 | - if($viewCache->isEnabled()) { |
|
| 92 | + if ($viewCache->isEnabled()) { |
|
| 93 | 93 | $viewCache->setup(); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | $lang = Lang::getInstance(); |
| 100 | 100 | |
| 101 | - if($lang->isEnabled()) { |
|
| 101 | + if ($lang->isEnabled()) { |
|
| 102 | 102 | $lang->load(); |
| 103 | 103 | } |
| 104 | 104 | |