@@ -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 |
@@ -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)) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if (strpos($block, 'filename') !== false) { |
173 | 173 | list($nameParam, $file) = self::getParsedFile($block); |
174 | 174 | |
175 | - if(!$file) { |
|
175 | + if (!$file) { |
|
176 | 176 | continue; |
177 | 177 | } |
178 | 178 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | { |
225 | 225 | list($name, $filename, $type, $content) = self::parseFileData($block); |
226 | 226 | |
227 | - if(!$content) { |
|
227 | + if (!$content) { |
|
228 | 228 | return null; |
229 | 229 | } |
230 | 230 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | 'size' => $fs->size($tempName), |
243 | 243 | ]); |
244 | 244 | |
245 | - register_shutdown_function(function () use ($fs, $tempName) { |
|
245 | + register_shutdown_function(function() use ($fs, $tempName) { |
|
246 | 246 | $fs->remove($tempName); |
247 | 247 | }); |
248 | 248 |