@@ -92,7 +92,7 @@ |
||
| 92 | 92 | */ |
| 93 | 93 | public function get(): ModelCollection |
| 94 | 94 | { |
| 95 | - $models = array_map(function ($item) { |
|
| 95 | + $models = array_map(function($item) { |
|
| 96 | 96 | return wrapToModel($item, static::class); |
| 97 | 97 | }, $this->ormInstance->get()); |
| 98 | 98 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ->offset($this->perPage * ($this->page - 1)) |
| 90 | 90 | ->get(); |
| 91 | 91 | |
| 92 | - $models = array_map(function ($item) { |
|
| 92 | + $models = array_map(function($item) { |
|
| 93 | 93 | return wrapToModel($item, $this->modelClass); |
| 94 | 94 | }, $ormInstances); |
| 95 | 95 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function lastPageNumber(): int |
| 171 | 171 | { |
| 172 | - return (int)ceil($this->total() / $this->perPage); |
|
| 172 | + return (int) ceil($this->total() / $this->perPage); |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | /** |
@@ -134,7 +134,7 @@ |
||
| 134 | 134 | { |
| 135 | 135 | $user = $this->authService->get('uuid', $uuid); |
| 136 | 136 | |
| 137 | - if($user) { |
|
| 137 | + if ($user) { |
|
| 138 | 138 | $this->setUpdatedTokens($user); |
| 139 | 139 | return true; |
| 140 | 140 | } |
@@ -207,8 +207,7 @@ |
||
| 207 | 207 | } else { |
| 208 | 208 | if ($processTemplates) { |
| 209 | 209 | $this->processTemplates($srcPath, $dstPath); |
| 210 | - } |
|
| 211 | - else { |
|
| 210 | + } else { |
|
| 212 | 211 | $this->fs->copy($srcPath, $dstPath); |
| 213 | 212 | } |
| 214 | 213 | $copiedFiles[] = $dstPath; |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @param string $srcPath |
| 222 | 222 | * @param string $dstPath |
| 223 | 223 | */ |
| 224 | - private function processTemplates(string $srcPath, string &$dstPath){ |
|
| 224 | + private function processTemplates(string $srcPath, string &$dstPath) { |
|
| 225 | 225 | $dstPath = str_replace('.tpl', '.php', $dstPath); |
| 226 | 226 | $content = $this->fs->get($srcPath); |
| 227 | 227 | $processedContent = $this->replacePlaceholders($content); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | private function replacePlaceholders(string $content): string |
| 236 | 236 | { |
| 237 | 237 | $placeholders = [ |
| 238 | - '{{MODULE_NAMESPACE}}' => module_base_namespace() .'\\' . $this->getModuleName(), |
|
| 238 | + '{{MODULE_NAMESPACE}}' => module_base_namespace() . '\\' . $this->getModuleName(), |
|
| 239 | 239 | '{{MODULE_NAME}}' => $this->getModuleName(), |
| 240 | 240 | ]; |
| 241 | 241 | |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | throw ModuleException::moduleRoutesNotFound($module); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - if(empty(self::$moduleRoutes[$module])) { |
|
| 155 | + if (empty(self::$moduleRoutes[$module])) { |
|
| 156 | 156 | self::$moduleRoutes[$module] = $this->fs->require($moduleRoutes, true); |
| 157 | 157 | } |
| 158 | 158 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | $currentMiddleware = $this->getMiddleware($request, $response); |
| 61 | 61 | |
| 62 | - list($request, $response) = $currentMiddleware->apply($request, $response, function ($request, $response) { |
|
| 62 | + list($request, $response) = $currentMiddleware->apply($request, $response, function($request, $response) { |
|
| 63 | 63 | next($this->middlewares); |
| 64 | 64 | return [$request, $response]; |
| 65 | 65 | }); |