@@ -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); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @credit <a href="https://codeigniter.com">CodeIgniter 4.2 - date_helper</a> |
| 18 | 18 | */ |
| 19 | -if (! function_exists('now')) { |
|
| 19 | +if (!function_exists('now')) { |
|
| 20 | 20 | /** |
| 21 | 21 | * Get "now" time |
| 22 | 22 | * |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | -if (! function_exists('timezone_select')) { |
|
| 56 | +if (!function_exists('timezone_select')) { |
|
| 57 | 57 | /** |
| 58 | 58 | * Generates a select field of all available timezones |
| 59 | 59 | * |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | 'nom' => $key, |
| 70 | 70 | 'chemin du serveur' => clean_path($field['server_path']), |
| 71 | 71 | 'taille' => number_to_size($field['size']), |
| 72 | - 'date' => $field['date'], // @todo formatter avec Utilities\Date |
|
| 72 | + 'date' => $field['date'], // @todo formatter avec Utilities\Date |
|
| 73 | 73 | ]; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function expectsJson(): bool |
| 33 | 33 | { |
| 34 | - return ($this->ajax() && ! $this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson(); |
|
| 34 | + return ($this->ajax() && !$this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson(); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -40,11 +40,11 @@ |
||
| 40 | 40 | if (empty($dependency['class']) || empty($dependency['package'])) { |
| 41 | 41 | throw new InvalidArgumentException('Invalid dependencies property'); |
| 42 | 42 | } |
| 43 | - if (! is_string($dependency['class']) || ! is_string($dependency['package'])) { |
|
| 43 | + if (!is_string($dependency['class']) || !is_string($dependency['package'])) { |
|
| 44 | 44 | throw new InvalidArgumentException('Invalid dependencies property'); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if (! class_exists($dependency['class'])) { |
|
| 47 | + if (!class_exists($dependency['class'])) { |
|
| 48 | 48 | throw new RuntimeException(lang('Mail.dependancyNotFound', [$dependency['class'], static::class, $dependency['package']])); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -269,7 +269,7 @@ |
||
| 269 | 269 | */ |
| 270 | 270 | private function attribute(string $key, $value): self |
| 271 | 271 | { |
| 272 | - if (! in_array($key, $this->allowedAttributes, true)) { |
|
| 272 | + if (!in_array($key, $this->allowedAttributes, true)) { |
|
| 273 | 273 | throw new InvalidArgumentException("L'attribute [{$key}] n'existe pas."); |
| 274 | 274 | } |
| 275 | 275 | |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | } elseif ($rest) { |
| 98 | 98 | $rest = is_string($rest) ? $rest : 'controller'; |
| 99 | 99 | |
| 100 | - if (! in_array($rest, ['controller', 'presenter'], true)) { |
|
| 100 | + if (!in_array($rest, ['controller', 'presenter'], true)) { |
|
| 101 | 101 | // @codeCoverageIgnoreStart |
| 102 | 102 | $rest = $this->choice(lang('CLI.generator.parentClass'), ['controller', 'presenter']); |
| 103 | 103 | $this->newLine(); |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | $i = 1; |
| 126 | 126 | |
| 127 | 127 | foreach ($route['params'] as $required) { |
| 128 | - if ($longest && ! $required) { |
|
| 128 | + if ($longest && !$required) { |
|
| 129 | 129 | $sampleUri .= '/' . $i++; |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -74,14 +74,14 @@ discard block |
||
| 74 | 74 | return; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - if (! in_array($env, self::$knownTypes, true)) { |
|
| 77 | + if (!in_array($env, self::$knownTypes, true)) { |
|
| 78 | 78 | $this->error(sprintf('Type d\'environnement non valide "%s". Attendu un des "%s".', $env, implode('" et "', self::$knownTypes))); |
| 79 | 79 | $this->newLine(); |
| 80 | 80 | |
| 81 | 81 | return; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! $this->writeNewEnvironmentToEnvFile($env)) { |
|
| 84 | + if (!$this->writeNewEnvironmentToEnvFile($env)) { |
|
| 85 | 85 | $this->error('Erreur dans l\'écriture nouvel environnement dans le fichier `.env`.'); |
| 86 | 86 | $this->newLine(); |
| 87 | 87 | |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | $baseEnv = ROOTPATH . '.env.example'; |
| 102 | 102 | $envFile = ROOTPATH . '.env'; |
| 103 | 103 | |
| 104 | - if (! is_file($envFile)) { |
|
| 105 | - if (! is_file($baseEnv)) { |
|
| 104 | + if (!is_file($envFile)) { |
|
| 105 | + if (!is_file($baseEnv)) { |
|
| 106 | 106 | $this->writer->warn('Les deux fichiers `.env.example` et `.env` sont manquants.', true); |
| 107 | 107 | $this->write('Il est impossible d\'écrire le nouveau type d\'environnement.'); |
| 108 | 108 | $this->newLine(); |