@@ -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 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $this->matchedRoutes = $this->findMatches($uri); |
| 103 | 103 | |
| 104 | 104 | if (empty($this->matchedRoutes)) { |
| 105 | - stop(function () { |
|
| 105 | + stop(function() { |
|
| 106 | 106 | $this->handleNotFound(); |
| 107 | 107 | }); |
| 108 | 108 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | $routePattern = '(\/)?'; |
| 204 | 204 | $routeParams = []; |
| 205 | 205 | |
| 206 | - $lastIndex = (int)array_key_last($routeSegments); |
|
| 206 | + $lastIndex = (int) array_key_last($routeSegments); |
|
| 207 | 207 | |
| 208 | 208 | foreach ($routeSegments as $index => $segment) { |
| 209 | 209 | $segmentParam = $this->getSegmentParam($segment, $index, $lastIndex); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | if (config()->get('debug')) { |
| 88 | 88 | $this->mailer->SMTPDebug = SMTP::DEBUG_SERVER; |
| 89 | 89 | |
| 90 | - $this->mailer->Debugoutput = function ($message) { |
|
| 90 | + $this->mailer->Debugoutput = function($message) { |
|
| 91 | 91 | if (Debugger::getInstance()->isEnabled()) { |
| 92 | 92 | Debugger::getInstance()->addToStoreCell(Debugger::MAILS, LogLevel::WARNING, $message); |
| 93 | 93 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | public function setAttachment(string $attachment): SmtpAdapter |
| 195 | 195 | { |
| 196 | - $this->attachments[] = $attachment;; |
|
| 196 | + $this->attachments[] = $attachment; ; |
|
| 197 | 197 | return $this; |
| 198 | 198 | } |
| 199 | 199 | |
@@ -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 | /** |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | $router->findRoute(); |
| 77 | 77 | |
| 78 | 78 | if (config()->get('multilang')) { |
| 79 | - Lang::getInstance((int)config()->get(Lang::LANG_SEGMENT))->load(); |
|
| 79 | + Lang::getInstance((int) config()->get(Lang::LANG_SEGMENT))->load(); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $debugger->addToStoreCell(Debugger::HOOKS, LogLevel::INFO, HookManager::getRegistered()); |
@@ -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 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | { |
| 52 | 52 | $this->fs = Di::get(FileSystem::class); |
| 53 | 53 | |
| 54 | - if(!$this->fs->isDirectory( $params['path'])) { |
|
| 54 | + if (!$this->fs->isDirectory($params['path'])) { |
|
| 55 | 55 | throw LoggerException::logPathIsNotDirectory($params['path']); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -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]; |