@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | $appKey = env('APP_KEY'); |
90 | 90 | |
91 | - if(!$appKey) { |
|
91 | + if (!$appKey) { |
|
92 | 92 | throw AppException::missingAppKey(); |
93 | 93 | } |
94 | 94 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | function _message(string $subject, $params): string |
105 | 105 | { |
106 | 106 | if (is_array($params)) { |
107 | - return preg_replace_callback('/{%\d+}/', function () use (&$params) { |
|
107 | + return preg_replace_callback('/{%\d+}/', function() use (&$params) { |
|
108 | 108 | return array_shift($params); |
109 | 109 | }, $subject); |
110 | 110 | } else { |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | for ($i = 0; $i < $length; $i++) { |
208 | 208 | $randomString .= rand(0, 9); |
209 | 209 | } |
210 | - return (int)$randomString; |
|
210 | + return (int) $randomString; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public static function addToStore(string $cell, string $level, $data) |
110 | 110 | { |
111 | - if(!empty($data)) { |
|
111 | + if (!empty($data)) { |
|
112 | 112 | array_push(self::$store[$cell], [$level => $data]); |
113 | 113 | } |
114 | 114 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | protected function createTab(string $type) |
138 | 138 | { |
139 | - if(!$this->debugbar->hasCollector($type)) { |
|
139 | + if (!$this->debugbar->hasCollector($type)) { |
|
140 | 140 | $this->debugbar->addCollector(new MessagesCollector($type)); |
141 | 141 | } |
142 | 142 |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function baseName(string $path): string |
113 | 113 | { |
114 | - return (string)pathinfo($path, PATHINFO_BASENAME); |
|
114 | + return (string) pathinfo($path, PATHINFO_BASENAME); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function fileName(string $path): string |
123 | 123 | { |
124 | - return (string)pathinfo($path, PATHINFO_FILENAME); |
|
124 | + return (string) pathinfo($path, PATHINFO_FILENAME); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function extension(string $path): string |
133 | 133 | { |
134 | - return (string)pathinfo($path, PATHINFO_EXTENSION); |
|
134 | + return (string) pathinfo($path, PATHINFO_EXTENSION); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -504,7 +504,7 @@ |
||
504 | 504 | if (config()->has('debug')) { |
505 | 505 | $this->mailer->SMTPDebug = 1; |
506 | 506 | |
507 | - $this->mailer->Debugoutput = function ($data, $level) { |
|
507 | + $this->mailer->Debugoutput = function($data, $level) { |
|
508 | 508 | Debugger::addToStore(Debugger::MAILS, $level, $data); |
509 | 509 | }; |
510 | 510 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | |
80 | 80 | $uri = $this->request->getUri(); |
81 | 81 | |
82 | - if(!$uri) { |
|
82 | + if (!$uri) { |
|
83 | 83 | throw RouteException::notFound(); |
84 | 84 | } |
85 | 85 |
@@ -82,9 +82,9 @@ |
||
82 | 82 | public static function updateDebuggerStore(array $data) |
83 | 83 | { |
84 | 84 | $currentRoute = RouteController::getCurrentRoute(); |
85 | - $routeInfo = []; |
|
85 | + $routeInfo = []; |
|
86 | 86 | |
87 | - array_walk($currentRoute, function ($value, $key) use (&$routeInfo) { |
|
87 | + array_walk($currentRoute, function($value, $key) use (&$routeInfo) { |
|
88 | 88 | $routeInfo[ucfirst($key)] = !is_array($value) ?: implode(',', $value); |
89 | 89 | }); |
90 | 90 |
@@ -234,7 +234,7 @@ |
||
234 | 234 | 'size' => $fs->size($tempName), |
235 | 235 | ]); |
236 | 236 | |
237 | - register_shutdown_function(function () use ($fs, $tempName) { |
|
237 | + register_shutdown_function(function() use ($fs, $tempName) { |
|
238 | 238 | $fs->remove($tempName); |
239 | 239 | }); |
240 | 240 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | self::$__query = self::$server->query(); |
86 | 86 | |
87 | - self::$__headers = array_change_key_case((array)getallheaders(), CASE_LOWER); |
|
87 | + self::$__headers = array_change_key_case((array) getallheaders(), CASE_LOWER); |
|
88 | 88 | |
89 | 89 | list('params' => $params, 'files' => $files) = self::parsedParams(); |
90 | 90 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $csrfToken = null; |
228 | 228 | |
229 | 229 | if (self::has('token')) { |
230 | - $csrfToken = (string)self::get('token'); |
|
230 | + $csrfToken = (string) self::get('token'); |
|
231 | 231 | } elseif (self::hasHeader('X-csrf-token')) { |
232 | 232 | $csrfToken = self::getHeader('X-csrf-token'); |
233 | 233 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | { |
244 | 244 | $bearerToken = null; |
245 | 245 | |
246 | - $authorization = (string)self::getHeader('Authorization'); |
|
246 | + $authorization = (string) self::getHeader('Authorization'); |
|
247 | 247 | |
248 | 248 | if (self::hasHeader('Authorization')) { |
249 | 249 | if (preg_match('/Bearer\s(\S+)/', $authorization, $matches)) { |