@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $currentMiddleware = $this->getMiddleware($request, $response); |
| 68 | 68 | |
| 69 | - list($request, $response) = $currentMiddleware->apply($request, $response, function ($request, $response) { |
|
| 69 | + list($request, $response) = $currentMiddleware->apply($request, $response, function($request, $response) { |
|
| 70 | 70 | next($this->middlewares); |
| 71 | 71 | return [$request, $response]; |
| 72 | 72 | }); |
@@ -89,8 +89,8 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | return $loader->loadClassFromFile( |
| 91 | 91 | $middlewarePath, |
| 92 | - function () { return MiddlewareException::middlewareNotFound(current($this->middlewares)); }, |
|
| 93 | - function () { return MiddlewareException::notDefined(current($this->middlewares)); }, |
|
| 92 | + function() { return MiddlewareException::middlewareNotFound(current($this->middlewares)); }, |
|
| 93 | + function() { return MiddlewareException::notDefined(current($this->middlewares)); }, |
|
| 94 | 94 | [$request, $response] |
| 95 | 95 | ); |
| 96 | 96 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | ]; |
| 112 | 112 | |
| 113 | 113 | if (is_array($value)) { |
| 114 | - return array_map(function ($v) use ($escapeMap) { |
|
| 114 | + return array_map(function($v) use ($escapeMap) { |
|
| 115 | 115 | return is_string($v) ? strtr($v, $escapeMap) : $v; |
| 116 | 116 | }, $value); |
| 117 | 117 | } |
@@ -136,6 +136,6 @@ |
||
| 136 | 136 | */ |
| 137 | 137 | private static function createJwtInstance(string $adapter): ?JwtToken |
| 138 | 138 | { |
| 139 | - return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array)config()->get('auth.claims')) : null; |
|
| 139 | + return $adapter === Auth::JWT ? (new JwtToken())->setLeeway(1)->setClaims((array) config()->get('auth.claims')) : null; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | \ No newline at end of file |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | |
| 136 | 136 | $user = $this->authService->get($this->keyFields[AuthKeys::REFRESH_TOKEN], $refreshToken); |
| 137 | 137 | |
| 138 | - if($user) { |
|
| 138 | + if ($user) { |
|
| 139 | 139 | $this->setUpdatedTokens($user); |
| 140 | 140 | return true; |
| 141 | 141 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | * @param string $srcPath |
| 201 | 201 | * @param string $dstPath |
| 202 | 202 | */ |
| 203 | - private function processTemplates(string $srcPath, string $dstPath){ |
|
| 203 | + private function processTemplates(string $srcPath, string $dstPath) { |
|
| 204 | 204 | $dstPath = str_replace('.tpl', '.php', $dstPath); |
| 205 | 205 | $content = $this->fs->get($srcPath); |
| 206 | 206 | $processedContent = $this->replacePlaceholders($content); |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | private function replacePlaceholders(string $content): string |
| 215 | 215 | { |
| 216 | 216 | $placeholders = [ |
| 217 | - '{{MODULE_NAMESPACE}}' => $this->getBaseNamespace() .'\\' . $this->getModuleName(), |
|
| 217 | + '{{MODULE_NAMESPACE}}' => $this->getBaseNamespace() . '\\' . $this->getModuleName(), |
|
| 218 | 218 | '{{MODULE_NAME}}' => $this->getModuleName(), |
| 219 | 219 | ]; |
| 220 | 220 | |
@@ -188,8 +188,7 @@ |
||
| 188 | 188 | } else { |
| 189 | 189 | if ($processTemplates) { |
| 190 | 190 | $this->processTemplates($srcPath, $dstPath); |
| 191 | - } |
|
| 192 | - else { |
|
| 191 | + } else { |
|
| 193 | 192 | $this->fs->copy($srcPath, $dstPath); |
| 194 | 193 | } |
| 195 | 194 | } |