@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $callback = Services::request()->getQuery('callback'); |
| 33 | 33 | |
| 34 | 34 | if (empty($callback)) { |
| 35 | - return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
|
| 35 | + return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Nous n'honorons qu'un rappel jsonp qui sont des identifiants javascript valides |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function format($data) |
| 27 | 27 | { |
| 28 | - if (! is_array($data)) { |
|
| 28 | + if (!is_array($data)) { |
|
| 29 | 29 | $data = (array) $data; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
| 72 | + if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
| 73 | 73 | return null; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | ->requireDirectory(APP_PATH, Checker::CHECK_IS_READABLE); |
| 123 | 123 | |
| 124 | 124 | $output = $checker->check(); |
| 125 | - if (! $checker->isSatisfied()) { |
|
| 125 | + if (!$checker->isSatisfied()) { |
|
| 126 | 126 | echo '<h3>An error encourred</h3>'; |
| 127 | 127 | |
| 128 | 128 | exit(implode('<br/> ', $checker->getErrors())); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | public function timelineData(): array |
| 110 | 110 | { |
| 111 | - if (! $this->hasTimeline) { |
|
| 111 | + if (!$this->hasTimeline) { |
|
| 112 | 112 | return []; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | */ |
| 78 | 78 | protected function collectLogs() |
| 79 | 79 | { |
| 80 | - if (! empty($this->data)) { |
|
| 80 | + if (!empty($this->data)) { |
|
| 81 | 81 | return $this->data; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -84,14 +84,14 @@ |
||
| 84 | 84 | $command = is_string($command) ? $command : 'command:name'; |
| 85 | 85 | $type = is_string($type) ? $type : 'basic'; |
| 86 | 86 | |
| 87 | - if (! in_array($type, ['basic', 'generator'], true)) { |
|
| 87 | + if (!in_array($type, ['basic', 'generator'], true)) { |
|
| 88 | 88 | // @codeCoverageIgnoreStart |
| 89 | 89 | $type = $this->choice(lang('CLI.generator.commandType'), ['basic', 'generator'], 'basic'); |
| 90 | 90 | $this->eol(); |
| 91 | 91 | // @codeCoverageIgnoreEnd |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if (! is_string($group)) { |
|
| 94 | + if (!is_string($group)) { |
|
| 95 | 95 | $group = $type === 'generator' ? 'Generators' : 'BlitzPHP'; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $this->getModel(); |
| 93 | 93 | |
| 94 | - if (! empty($this->helpers)) { |
|
| 94 | + if (!empty($this->helpers)) { |
|
| 95 | 95 | helper($this->helpers); |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | $this->modelName = is_object($which) ? null : $which; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - if (empty($this->model) && ! empty($this->modelName) && class_exists($this->modelName)) { |
|
| 112 | + if (empty($this->model) && !empty($this->modelName) && class_exists($this->modelName)) { |
|
| 113 | 113 | $this->model = model($this->modelName); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if (! empty($this->model) && empty($this->modelName)) { |
|
| 116 | + if (!empty($this->model) && empty($this->modelName)) { |
|
| 117 | 117 | $this->modelName = get_class($this->model); |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | private function getModel() |
| 153 | 153 | { |
| 154 | - if (! empty($this->modelName)) { |
|
| 154 | + if (!empty($this->modelName)) { |
|
| 155 | 155 | $model = $this->modelName; |
| 156 | 156 | } else { |
| 157 | 157 | $model = str_replace('Controller', 'Model', static::class); |
@@ -152,19 +152,19 @@ |
||
| 152 | 152 | */ |
| 153 | 153 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
| 154 | 154 | { |
| 155 | - if (! in_array($request->getMethod(), $this->methods, true)) { |
|
| 155 | + if (!in_array($request->getMethod(), $this->methods, true)) { |
|
| 156 | 156 | return $handler->handle($request); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | [$type] = explode(';', $request->getHeaderLine('Content-Type')); |
| 160 | 160 | $type = strtolower($type); |
| 161 | - if (! isset($this->parsers[$type])) { |
|
| 161 | + if (!isset($this->parsers[$type])) { |
|
| 162 | 162 | return $handler->handle($request); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $parser = $this->parsers[$type]; |
| 166 | 166 | $result = $parser($request->getBody()->getContents()); |
| 167 | - if (! is_array($result)) { |
|
| 167 | + if (!is_array($result)) { |
|
| 168 | 168 | throw HttpException::badRequest(); |
| 169 | 169 | } |
| 170 | 170 | $request = $request->withParsedBody($result); |