@@ -104,7 +104,7 @@ |
||
| 104 | 104 | throw LangException::misconfiguredDefaultConfig(); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - if (empty($lang) || !in_array($lang, (array)config()->get('langs'))) { |
|
| 107 | + if (empty($lang) || !in_array($lang, (array) config()->get('langs'))) { |
|
| 108 | 108 | $lang = config()->get('lang_default'); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $responseHeaders = []; |
| 161 | 161 | |
| 162 | 162 | while ($this->responseHeaders->valid()) { |
| 163 | - $responseHeaders[strtolower((string)$this->responseHeaders->key())] = $this->responseHeaders->current(); |
|
| 163 | + $responseHeaders[strtolower((string) $this->responseHeaders->key())] = $this->responseHeaders->current(); |
|
| 164 | 164 | $this->responseHeaders->next(); |
| 165 | 165 | } |
| 166 | 166 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | private function fetch(): Curl |
| 221 | 221 | { |
| 222 | 222 | if ($this->curl instanceof MultiCurl) { |
| 223 | - $this->curl->complete(function ($instance) { |
|
| 223 | + $this->curl->complete(function($instance) { |
|
| 224 | 224 | if ($instance->error) { |
| 225 | 225 | $this->errors[] = [ |
| 226 | 226 | 'code' => $instance->getErrorCode(), |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function fileName(string $path): string |
| 184 | 184 | { |
| 185 | - return (string)pathinfo($path, PATHINFO_FILENAME); |
|
| 185 | + return (string) pathinfo($path, PATHINFO_FILENAME); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function extension(string $path): string |
| 194 | 194 | { |
| 195 | - return (string)pathinfo($path, PATHINFO_EXTENSION); |
|
| 195 | + return (string) pathinfo($path, PATHINFO_EXTENSION); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | public function init(string $baseDir): int |
| 56 | 56 | { |
| 57 | - App::loadCoreFunctions($baseDir. DS . 'vendor' . DS .'quantum' . DS . 'framework' . DS . 'src' . DS . 'Helpers'); |
|
| 57 | + App::loadCoreFunctions($baseDir . DS . 'vendor' . DS . 'quantum' . DS . 'framework' . DS . 'src' . DS . 'Helpers'); |
|
| 58 | 58 | |
| 59 | 59 | App::setBaseDir($baseDir); |
| 60 | 60 | |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Class Request |
| 20 | 20 | * @package Quantum\Http |
| 21 | - |
|
| 22 | 21 | * @method static void create(string $method, string $url, array $data = null, array $file = null) |
| 23 | 22 | * @method static void flush() |
| 24 | 23 | * @method static string|null getMethod() |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $getParams = []; |
| 37 | 37 | |
| 38 | 38 | if (!empty($_GET)) { |
| 39 | - $getParams = filter_input_array(INPUT_GET, FILTER_DEFAULT) ?: [] ; |
|
| 39 | + $getParams = filter_input_array(INPUT_GET, FILTER_DEFAULT) ?: []; |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return $getParams; |
@@ -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 | |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function join(string $table, array $constraint, string $tableAlias = null): DbalInterface |
| 33 | 33 | { |
| 34 | - $this->getOrmModel()->join($table, $constraint, $tableAlias); |
|
| 35 | - return $this; |
|
| 34 | + $this->getOrmModel()->join($table, $constraint, $tableAlias); |
|
| 35 | + return $this; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function select(...$columns): DbalInterface |
| 33 | 33 | { |
| 34 | - array_walk($columns, function (&$column) { |
|
| 34 | + array_walk($columns, function(&$column) { |
|
| 35 | 35 | if (is_array($column)) { |
| 36 | 36 | $column = array_flip($column); |
| 37 | 37 | } |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | $switch = $nextItem['switch']; |
| 84 | 84 | $joinType = $nextItem['type']; |
| 85 | 85 | |
| 86 | - $queryBuilder->join(function ($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) { |
|
| 86 | + $queryBuilder->join(function($item) use ($currentItem, $modelToJoin, $switch, $joinType, $level) { |
|
| 87 | 87 | |
| 88 | 88 | $newQueryBuilder = (new self($modelToJoin->table))->getOrmModel()->createQueryBuilder(); |
| 89 | 89 | |