@@ -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 | }); |
@@ -130,7 +130,7 @@ |
||
130 | 130 | */ |
131 | 131 | function route_cache_settings(): ?array |
132 | 132 | { |
133 | - return RouteController::getCurrentRoute()['cache_settings'] ?? null; |
|
133 | + return RouteController::getCurrentRoute()['cache_settings'] ?? null; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
@@ -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]; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | function _message(string $subject, $params): string |
49 | 49 | { |
50 | 50 | if (is_array($params)) { |
51 | - return preg_replace_callback('/{%\d+}/', function () use (&$params) { |
|
51 | + return preg_replace_callback('/{%\d+}/', function() use (&$params) { |
|
52 | 52 | return array_shift($params); |
53 | 53 | }, $subject); |
54 | 54 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | for ($i = 0; $i < $length; $i++) { |
157 | 157 | $randomString .= rand(0, 9); |
158 | 158 | } |
159 | - return (int)$randomString; |
|
159 | + return (int) $randomString; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -26,7 +26,9 @@ |
||
26 | 26 | use Quantum\Di\Exceptions\DiException; |
27 | 27 | use ReflectionException; |
28 | 28 | |
29 | -if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR); |
|
29 | +if (!defined('DS')) { |
|
30 | + define('DS', DIRECTORY_SEPARATOR); |
|
31 | +} |
|
30 | 32 | |
31 | 33 | /** |
32 | 34 | * Class ConsoleAppAdapter |
@@ -137,7 +137,7 @@ |
||
137 | 137 | */ |
138 | 138 | public function lastPageNumber(): int |
139 | 139 | { |
140 | - return (int)ceil($this->total() / $this->perPage); |
|
140 | + return (int) ceil($this->total() / $this->perPage); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -75,7 +75,7 @@ |
||
75 | 75 | ->offset($this->perPage * ($this->page - 1)) |
76 | 76 | ->get(); |
77 | 77 | |
78 | - $models = array_map(function ($item) { |
|
78 | + $models = array_map(function($item) { |
|
79 | 79 | return wrapToModel($item, $this->modelClass); |
80 | 80 | }, $ormInstances); |
81 | 81 |