@@ -86,7 +86,7 @@ |
||
86 | 86 | */ |
87 | 87 | private function generateRandomKey(): string |
88 | 88 | { |
89 | - return base64_encode(random_bytes((int)$this->getOption('length'))); |
|
89 | + return base64_encode(random_bytes((int) $this->getOption('length'))); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | } |
@@ -90,13 +90,13 @@ |
||
90 | 90 | Config::getInstance()->load(new Setup('config', 'config')); |
91 | 91 | |
92 | 92 | if (config()->get('multilang')) { |
93 | - Lang::getInstance((int)config()->get(Lang::LANG_SEGMENT))->load(); |
|
93 | + Lang::getInstance((int) config()->get(Lang::LANG_SEGMENT))->load(); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this->application->run($input, $output); |
97 | 97 | } catch (\Throwable $throwable) { |
98 | 98 | $output->writeln("<error>" . $throwable->getMessage() . "</error>"); |
99 | - return (int)$throwable->getCode(); |
|
99 | + return (int) $throwable->getCode(); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | - $step = (int)$this->getOption('step') ?: null; |
|
77 | + $step = (int) $this->getOption('step') ?: null; |
|
78 | 78 | |
79 | 79 | $migrationManager = new MigrationManager(); |
80 | 80 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $modules = require_once $modulesConfigPath; |
94 | 94 | |
95 | 95 | foreach ($modules['modules'] as $module => $options) { |
96 | - if ($module == $newModuleName || $options['prefix'] == strtolower($newModuleName)) { |
|
96 | + if ($module == $newModuleName || $options['prefix'] == strtolower($newModuleName)) { |
|
97 | 97 | $this->error('A module or prefix named ' . $newModuleName . ' already exists'); |
98 | 98 | return; |
99 | 99 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $this->client = new MultiCurl(); |
97 | 97 | |
98 | - $this->client->complete(function (Curl $instance) { |
|
98 | + $this->client->complete(function(Curl $instance) { |
|
99 | 99 | $this->handleResponse($instance); |
100 | 100 | }); |
101 | 101 | |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | $headers = []; |
374 | 374 | |
375 | 375 | while ($httpHeaders->valid()) { |
376 | - $headers[strtolower((string)$httpHeaders->key())] = $httpHeaders->current(); |
|
376 | + $headers[strtolower((string) $httpHeaders->key())] = $httpHeaders->current(); |
|
377 | 377 | $httpHeaders->next(); |
378 | 378 | } |
379 | 379 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | self::$__query = self::$server->query(); |
98 | 98 | |
99 | - self::$__headers = array_change_key_case((array)getallheaders(), CASE_LOWER); |
|
99 | + self::$__headers = array_change_key_case((array) getallheaders(), CASE_LOWER); |
|
100 | 100 | |
101 | 101 | list('params' => $params, 'files' => $files) = self::parsedParams(); |
102 | 102 | |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $csrfToken = null; |
242 | 242 | |
243 | 243 | if (self::has(Csrf::TOKEN_KEY)) { |
244 | - $csrfToken = (string)self::get(Csrf::TOKEN_KEY); |
|
244 | + $csrfToken = (string) self::get(Csrf::TOKEN_KEY); |
|
245 | 245 | } elseif (self::hasHeader('X-' . Csrf::TOKEN_KEY)) { |
246 | 246 | $csrfToken = self::getHeader('X-' . Csrf::TOKEN_KEY); |
247 | 247 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $bearerToken = null; |
259 | 259 | |
260 | - $authorization = (string)self::getHeader('Authorization'); |
|
260 | + $authorization = (string) self::getHeader('Authorization'); |
|
261 | 261 | |
262 | 262 | if (self::hasHeader('Authorization')) { |
263 | 263 | if (preg_match('/Bearer\s(\S+)/', $authorization, $matches)) { |