@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use BlitzPHP\Container\Services; |
13 | 13 | |
14 | -if (! function_exists('directory_map')) { |
|
14 | +if (!function_exists('directory_map')) { |
|
15 | 15 | /** |
16 | 16 | * Créer une carte de répertoire |
17 | 17 | * |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -if (! function_exists('directory_mirror')) { |
|
32 | +if (!function_exists('directory_mirror')) { |
|
33 | 33 | /** |
34 | 34 | * Copie récursivement les fichiers et répertoires du répertoire d'origine |
35 | 35 | * dans le répertoire cible, c'est-à-dire "miroir" son contenu. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | -if (! function_exists('write_file')) { |
|
45 | +if (!function_exists('write_file')) { |
|
46 | 46 | /** |
47 | 47 | * Write File |
48 | 48 | * |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | -if (! function_exists('delete_files')) { |
|
79 | +if (!function_exists('delete_files')) { |
|
80 | 80 | /** |
81 | 81 | * Delete Files |
82 | 82 | * |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | RecursiveIteratorIterator::CHILD_FIRST |
102 | 102 | ) as $object) { |
103 | 103 | $filename = $object->getFilename(); |
104 | - if (! $hidden && $filename[0] === '.') { |
|
104 | + if (!$hidden && $filename[0] === '.') { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | |
108 | - if (! $htdocs || ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { |
|
108 | + if (!$htdocs || !preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { |
|
109 | 109 | $isDir = $object->isDir(); |
110 | 110 | if ($isDir && $delDir) { |
111 | 111 | rmdir($object->getPathname()); |
112 | 112 | |
113 | 113 | continue; |
114 | 114 | } |
115 | - if (! $isDir) { |
|
115 | + if (!$isDir) { |
|
116 | 116 | unlink($object->getPathname()); |
117 | 117 | } |
118 | 118 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
128 | -if (! function_exists('get_filenames')) { |
|
128 | +if (!function_exists('get_filenames')) { |
|
129 | 129 | /** |
130 | 130 | * Get Filenames |
131 | 131 | * |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | RecursiveIteratorIterator::SELF_FIRST |
155 | 155 | ) as $name => $object) { |
156 | 156 | $basename = pathinfo($name, PATHINFO_BASENAME); |
157 | - if (! $hidden && $basename[0] === '.') { |
|
157 | + if (!$hidden && $basename[0] === '.') { |
|
158 | 158 | continue; |
159 | 159 | } |
160 | 160 | |
161 | - if ($includeDir || ! $object->isDir()) { |
|
161 | + if ($includeDir || !$object->isDir()) { |
|
162 | 162 | if ($includePath === false) { |
163 | 163 | $files[] = $basename; |
164 | 164 | } elseif ($includePath === null) { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | -if (! function_exists('get_dir_file_info')) { |
|
181 | +if (!function_exists('get_dir_file_info')) { |
|
182 | 182 | /** |
183 | 183 | * Get Directory File Information |
184 | 184 | * |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
227 | -if (! function_exists('get_file_info')) { |
|
227 | +if (!function_exists('get_file_info')) { |
|
228 | 228 | /** |
229 | 229 | * Get File Info |
230 | 230 | * |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | function get_file_info(string $file, $returnedValues = ['name', 'server_path', 'size', 'date']) |
242 | 242 | { |
243 | - if (! is_file($file)) { |
|
243 | + if (!is_file($file)) { |
|
244 | 244 | return null; |
245 | 245 | } |
246 | 246 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | } |
291 | 291 | } |
292 | 292 | |
293 | -if (! function_exists('symbolic_permissions')) { |
|
293 | +if (!function_exists('symbolic_permissions')) { |
|
294 | 294 | /** |
295 | 295 | * Symbolic Permissions |
296 | 296 | * |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | -if (! function_exists('octal_permissions')) { |
|
341 | +if (!function_exists('octal_permissions')) { |
|
342 | 342 | /** |
343 | 343 | * Octal Permissions |
344 | 344 | * |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | } |
355 | 355 | |
356 | -if (! function_exists('same_file')) { |
|
356 | +if (!function_exists('same_file')) { |
|
357 | 357 | /** |
358 | 358 | * Checks if two files both exist and have identical hashes |
359 | 359 | * |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | } |
367 | 367 | |
368 | -if (! function_exists('set_realpath')) { |
|
368 | +if (!function_exists('set_realpath')) { |
|
369 | 369 | /** |
370 | 370 | * Set Realpath |
371 | 371 | * |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | // Resolve the path |
382 | 382 | if (realpath($path) !== false) { |
383 | 383 | $path = realpath($path); |
384 | - } elseif ($checkExistence && ! is_dir($path) && ! is_file($path)) { |
|
384 | + } elseif ($checkExistence && !is_dir($path) && !is_file($path)) { |
|
385 | 385 | throw new InvalidArgumentException('Not a valid path: ' . $path); |
386 | 386 | } |
387 | 387 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function addIf(string $key, Closure $callback): void |
110 | 110 | { |
111 | - if (! $this->has($key)) { |
|
111 | + if (!$this->has($key)) { |
|
112 | 112 | $this->add($key, $callback); |
113 | 113 | } |
114 | 114 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | private function discoveProviders(): void |
226 | 226 | { |
227 | - if (! self::$discovered) { |
|
227 | + if (!self::$discovered) { |
|
228 | 228 | $locator = Services::locator(); |
229 | 229 | $files = array_merge( |
230 | 230 | $locator->search('Config/Providers'), |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | defined('DS') || define('DS', DIRECTORY_SEPARATOR); |
17 | 17 | |
18 | 18 | // Se rassurer que le dossier courant pointe sur le dossier du front controller |
19 | -if (! defined('TEST_PATH')) { |
|
19 | +if (!defined('TEST_PATH')) { |
|
20 | 20 | // On doit aussi verifier qu'on n'est pas en phase de test, sinon khalan ne trouvera pas le dossier des specs |
21 | 21 | chdir(WEBROOT); |
22 | 22 | } |
23 | 23 | |
24 | -return function (array $paths, string $paths_config_file, bool $is_cli) { |
|
24 | +return function(array $paths, string $paths_config_file, bool $is_cli) { |
|
25 | 25 | // Le chemin d'accès vers le dossier de l'application |
26 | 26 | if (is_dir($paths['app'])) { |
27 | 27 | if (($_temp = realpath($paths['app'])) !== false) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | require_once __DIR__ . DS . 'kint.php'; |
103 | 103 | |
104 | - if (! $is_cli) { |
|
104 | + if (!$is_cli) { |
|
105 | 105 | $app->run(); |
106 | 106 | } |
107 | 107 | }; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function __construct(bool $debug = false) |
33 | 33 | { |
34 | 34 | $this->mailer = new Mailer(); |
35 | - $this->mailer->Debugoutput = static function ($str, $level) { |
|
35 | + $this->mailer->Debugoutput = static function($str, $level) { |
|
36 | 36 | Services::logger()->info('[Mail][' . $level . ']: ' . $str); |
37 | 37 | }; |
38 | 38 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function init(array $config): self |
46 | 46 | { |
47 | - if (! empty($config['username']) && ! empty($config['password'])) { |
|
47 | + if (!empty($config['username']) && !empty($config['password'])) { |
|
48 | 48 | $this->mailer->SMTPAuth = true; |
49 | 49 | } |
50 | 50 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $this->config = $config ?? (object) config('toolbar'); |
68 | 68 | |
69 | 69 | foreach ($this->config->collectors as $collector) { |
70 | - if (! class_exists($collector)) { |
|
70 | + if (!class_exists($collector)) { |
|
71 | 71 | logger()->critical( |
72 | 72 | 'Toolbar collector does not exist (' . $collector . ').' |
73 | 73 | . ' Please check $collectors in the app/Config/toolbar.php file.' |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $data['vars']['varData'][esc($heading)] = $varData; |
134 | 134 | } |
135 | 135 | |
136 | - if (! empty($_SESSION)) { |
|
136 | + if (!empty($_SESSION)) { |
|
137 | 137 | foreach ($_SESSION as $key => $value) { |
138 | 138 | // Remplacez les données binaires par une chaîne pour éviter l'échec de json_encode. |
139 | 139 | if (is_string($value) && preg_match('~[^\x20-\x7E\t\r\n]~', $value)) { |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | $output = ''; |
207 | 207 | |
208 | 208 | foreach ($rows as $row) { |
209 | - $hasChildren = isset($row['children']) && ! empty($row['children']); |
|
210 | - $isQuery = isset($row['query']) && ! empty($row['query']); |
|
209 | + $hasChildren = isset($row['children']) && !empty($row['children']); |
|
210 | + $isQuery = isset($row['query']) && !empty($row['query']); |
|
211 | 211 | |
212 | 212 | // Ouvrir la chronologie du contrôleur par défaut |
213 | 213 | $open = $row['name'] === 'Controller'; |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | // Le collecter |
274 | 274 | foreach ($collectors as $collector) { |
275 | - if (! $collector['hasTimelineData']) { |
|
275 | + if (!$collector['hasTimelineData']) { |
|
276 | 276 | continue; |
277 | 277 | } |
278 | 278 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | array_multisort(...$sortArray); |
290 | 290 | |
291 | 291 | // Ajouter une heure de fin à chaque élément |
292 | - array_walk($data, static function (&$row) { |
|
292 | + array_walk($data, static function(&$row) { |
|
293 | 293 | $row['end'] = $row['start'] + $row['duration']; |
294 | 294 | }); |
295 | 295 | |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | $element = array_shift($elements); |
309 | 309 | |
310 | 310 | // Si nous avons des enfants derrière nous, récupérez-les et attachez-les-nous |
311 | - while (! empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) { |
|
311 | + while (!empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) { |
|
312 | 312 | $element['children'][] = array_shift($elements); |
313 | 313 | } |
314 | 314 | |
@@ -332,14 +332,14 @@ discard block |
||
332 | 332 | */ |
333 | 333 | protected function collectVarData(): array |
334 | 334 | { |
335 | - if (! ($this->config->collectVarData ?? true)) { |
|
335 | + if (!($this->config->collectVarData ?? true)) { |
|
336 | 336 | return []; |
337 | 337 | } |
338 | 338 | |
339 | 339 | $data = []; |
340 | 340 | |
341 | 341 | foreach ($this->collectors as $collector) { |
342 | - if (! $collector->hasVarData()) { |
|
342 | + if (!$collector->hasVarData()) { |
|
343 | 343 | continue; |
344 | 344 | } |
345 | 345 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | } |
375 | 375 | |
376 | 376 | // Si on a desactiver le debogage ou l'affichage de la debugbar, on s'arrete |
377 | - if (! BLITZ_DEBUG || ! $this->config->show_debugbar) { |
|
377 | + if (!BLITZ_DEBUG || !$this->config->show_debugbar) { |
|
378 | 378 | return $response; |
379 | 379 | } |
380 | 380 | |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | // Mise à jour vers microtime() pour que nous puissions obtenir l'historique |
390 | 390 | $time = sprintf('%.6f', Date::now()->format('U.u')); |
391 | 391 | |
392 | - if (! is_dir($this->debugPath)) { |
|
392 | + if (!is_dir($this->debugPath)) { |
|
393 | 393 | mkdir($this->debugPath, 0o777); |
394 | 394 | } |
395 | 395 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | // Les formats non HTML ne doivent pas inclure la barre de débogage, |
401 | 401 | // puis nous envoyons des en-têtes indiquant où trouver les données de débogage pour cette réponse |
402 | - if ($request->ajax() || ! str_contains($format, 'html')) { |
|
402 | + if ($request->ajax() || !str_contains($format, 'html')) { |
|
403 | 403 | return $response |
404 | 404 | ->withHeader('Debugbar-Time', "{$time}") |
405 | 405 | ->withHeader('Debugbar-Link', site_url("?debugbar_time={$time}")); |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public static function registerHttpErrors(Run $debugger, array $config): Run |
37 | 37 | { |
38 | - return $debugger->pushHandler(static function (Throwable $exception, InspectorInterface $inspector, RunInterface $run) use ($config) { |
|
38 | + return $debugger->pushHandler(static function(Throwable $exception, InspectorInterface $inspector, RunInterface $run) use ($config) { |
|
39 | 39 | if (true === $config['log']) { |
40 | - if (! in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
40 | + if (!in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
41 | 41 | Services::logger()->error($exception); |
42 | 42 | } |
43 | 43 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $debugger->pushHandler(new PlainTextHandler()); |
87 | 87 | } |
88 | 88 | |
89 | - if (! is_online()) { |
|
89 | + if (!is_online()) { |
|
90 | 90 | if (Misc::isAjaxRequest()) { |
91 | 91 | $debugger->pushHandler(new JsonResponseHandler()); |
92 | 92 | } else { |
@@ -94,7 +94,7 @@ |
||
94 | 94 | public function getVarData(): array |
95 | 95 | { |
96 | 96 | return [ |
97 | - 'Données de la vues' => array_filter($this->viewer->getData(), static fn ($data) => ! ($data instanceof ErrorBag)), |
|
97 | + 'Données de la vues' => array_filter($this->viewer->getData(), static fn ($data) => !($data instanceof ErrorBag)), |
|
98 | 98 | ]; |
99 | 99 | } |
100 | 100 |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $this->_streamMode = $options['streamMode'] ?? $this->_streamMode; |
453 | 453 | |
454 | 454 | if (isset($options['stream'])) { |
455 | - if (! $options['stream'] instanceof StreamInterface) { |
|
455 | + if (!$options['stream'] instanceof StreamInterface) { |
|
456 | 456 | throw new InvalidArgumentException('Stream option must be an object that implements StreamInterface'); |
457 | 457 | } |
458 | 458 | $this->stream = $options['stream']; |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $this->_setStatus($options['status']); |
469 | 469 | } |
470 | 470 | |
471 | - if (! isset($options['charset'])) { |
|
471 | + if (!isset($options['charset'])) { |
|
472 | 472 | $options['charset'] = config('app.charset'); |
473 | 473 | } |
474 | 474 | $this->_charset = $options['charset']; |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | $charset = true; |
517 | 517 | } |
518 | 518 | |
519 | - if ($charset && ! str_contains($type, ';')) { |
|
519 | + if ($charset && !str_contains($type, ';')) { |
|
520 | 520 | $this->_setHeader('Content-Type', "{$type}; charset={$this->_charset}"); |
521 | 521 | } else { |
522 | 522 | $this->_setHeader('Content-Type', $type); |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | protected function _clearHeader(string $header): void |
597 | 597 | { |
598 | 598 | $normalized = strtolower($header); |
599 | - if (! isset($this->headerNames[$normalized])) { |
|
599 | + if (!isset($this->headerNames[$normalized])) { |
|
600 | 600 | return; |
601 | 601 | } |
602 | 602 | $original = $this->headerNames[$normalized]; |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | if ($mapped) { |
753 | 753 | return is_array($mapped) ? current($mapped) : $mapped; |
754 | 754 | } |
755 | - if (! str_contains($contentType, '/')) { |
|
755 | + if (!str_contains($contentType, '/')) { |
|
756 | 756 | throw new InvalidArgumentException(sprintf('"%s" is an invalid content type.', $contentType)); |
757 | 757 | } |
758 | 758 | |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | */ |
836 | 836 | public function withCache($since, $time = '+1 day'): static |
837 | 837 | { |
838 | - if (! is_int($time)) { |
|
838 | + if (!is_int($time)) { |
|
839 | 839 | $time = strtotime($time); |
840 | 840 | if ($time === false) { |
841 | 841 | throw new InvalidArgumentException( |
@@ -1289,7 +1289,7 @@ discard block |
||
1289 | 1289 | */ |
1290 | 1290 | public function getCookie(string $name): ?array |
1291 | 1291 | { |
1292 | - if (! $this->_cookies->has($name)) { |
|
1292 | + if (!$this->_cookies->has($name)) { |
|
1293 | 1293 | return null; |
1294 | 1294 | } |
1295 | 1295 | |
@@ -1362,7 +1362,7 @@ discard block |
||
1362 | 1362 | |
1363 | 1363 | $extension = strtolower($file->getExtension()); |
1364 | 1364 | $mapped = $this->getMimeType($extension); |
1365 | - if ((! $extension || ! $mapped) && $options['download'] === null) { |
|
1365 | + if ((!$extension || !$mapped) && $options['download'] === null) { |
|
1366 | 1366 | $options['download'] = true; |
1367 | 1367 | } |
1368 | 1368 | |
@@ -1424,12 +1424,12 @@ discard block |
||
1424 | 1424 | if (str_contains($path, '../') || str_contains($path, '..\\')) { |
1425 | 1425 | throw new LoadException('The requested file contains `..` and will not be read.'); |
1426 | 1426 | } |
1427 | - if (! is_file($path)) { |
|
1427 | + if (!is_file($path)) { |
|
1428 | 1428 | $path = APP_PATH . $path; |
1429 | 1429 | } |
1430 | 1430 | |
1431 | 1431 | $file = new SplFileInfo($path); |
1432 | - if (! $file->isFile() || ! $file->isReadable()) { |
|
1432 | + if (!$file->isFile() || !$file->isReadable()) { |
|
1433 | 1433 | if (on_dev()) { |
1434 | 1434 | throw new LoadException(sprintf('The requested file %s was not found or not readable', $path)); |
1435 | 1435 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $this->cookies = $config['cookies']; |
235 | 235 | |
236 | 236 | if (isset($config['uri'])) { |
237 | - if (! $config['uri'] instanceof UriInterface) { |
|
237 | + if (!$config['uri'] instanceof UriInterface) { |
|
238 | 238 | throw new FrameworkException('The `uri` key must be an instance of ' . UriInterface::class); |
239 | 239 | } |
240 | 240 | $uri = $config['uri']; |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | $type = strtolower($type); |
440 | - if (! isset(static::$_detectors[$type])) { |
|
440 | + if (!isset(static::$_detectors[$type])) { |
|
441 | 441 | return false; |
442 | 442 | } |
443 | 443 | if ($args) { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | public function isAll(array $types): bool |
590 | 590 | { |
591 | 591 | foreach ($types as $type) { |
592 | - if (! $this->is($type)) { |
|
592 | + if (!$this->is($type)) { |
|
593 | 593 | return false; |
594 | 594 | } |
595 | 595 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | protected function normalizeHeaderName(string $name): string |
694 | 694 | { |
695 | 695 | $name = str_replace('-', '_', strtoupper($name)); |
696 | - if (! in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
696 | + if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
697 | 697 | $name = 'HTTP_' . $name; |
698 | 698 | } |
699 | 699 | |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | { |
872 | 872 | $new = clone $this; |
873 | 873 | |
874 | - if (! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) { |
|
874 | + if (!preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) { |
|
875 | 875 | throw new InvalidArgumentException(sprintf( |
876 | 876 | 'Méthode HTTP non prise en charge "%s" fournie', |
877 | 877 | $method |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | } |
1115 | 1115 | } |
1116 | 1116 | |
1117 | - if (! isset($accept[$prefValue])) { |
|
1117 | + if (!isset($accept[$prefValue])) { |
|
1118 | 1118 | $accept[$prefValue] = []; |
1119 | 1119 | } |
1120 | 1120 | if ($prefValue) { |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | if ($name === null) { |
1193 | 1193 | return $this->data; |
1194 | 1194 | } |
1195 | - if (! is_array($this->data)) { |
|
1195 | + if (!is_array($this->data)) { |
|
1196 | 1196 | return $default; |
1197 | 1197 | } |
1198 | 1198 | |
@@ -1332,7 +1332,7 @@ discard block |
||
1332 | 1332 | */ |
1333 | 1333 | public function withProtocolVersion(string $version): static |
1334 | 1334 | { |
1335 | - if (! preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) { |
|
1335 | + if (!preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) { |
|
1336 | 1336 | throw new InvalidArgumentException(sprintf('Version de protocole `%s` non prise en charge fournie.', $version)); |
1337 | 1337 | } |
1338 | 1338 | $new = clone $this; |
@@ -1354,7 +1354,7 @@ discard block |
||
1354 | 1354 | public function getEnv(string $key, ?string $default = null): ?string |
1355 | 1355 | { |
1356 | 1356 | $key = strtoupper($key); |
1357 | - if (! array_key_exists($key, $this->_environment)) { |
|
1357 | + if (!array_key_exists($key, $this->_environment)) { |
|
1358 | 1358 | $this->_environment[$key] = env($key); |
1359 | 1359 | } |
1360 | 1360 | |
@@ -1571,7 +1571,7 @@ discard block |
||
1571 | 1571 | $file = Arr::get($this->uploadedFiles, $path); |
1572 | 1572 | if (is_array($file)) { |
1573 | 1573 | foreach ($file as $f) { |
1574 | - if (! ($f instanceof UploadedFile)) { |
|
1574 | + if (!($f instanceof UploadedFile)) { |
|
1575 | 1575 | return null; |
1576 | 1576 | } |
1577 | 1577 | } |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | return $file; |
1580 | 1580 | } |
1581 | 1581 | |
1582 | - if (! ($file instanceof UploadedFileInterface)) { |
|
1582 | + if (!($file instanceof UploadedFileInterface)) { |
|
1583 | 1583 | return null; |
1584 | 1584 | } |
1585 | 1585 | |
@@ -1627,7 +1627,7 @@ discard block |
||
1627 | 1627 | continue; |
1628 | 1628 | } |
1629 | 1629 | |
1630 | - if (! $file instanceof UploadedFileInterface) { |
|
1630 | + if (!$file instanceof UploadedFileInterface) { |
|
1631 | 1631 | throw new InvalidArgumentException("Fichier invalide à '{$path}{$key}'"); |
1632 | 1632 | } |
1633 | 1633 | } |
@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | } |
1679 | 1679 | |
1680 | 1680 | $host = $uri->getHost(); |
1681 | - if (! $host) { |
|
1681 | + if (!$host) { |
|
1682 | 1682 | return $new; |
1683 | 1683 | } |
1684 | 1684 | $port = $uri->getPort(); |
@@ -1786,7 +1786,7 @@ discard block |
||
1786 | 1786 | $validLocales = config('app.supported_locales'); |
1787 | 1787 | // S'il ne s'agit pas d'un paramètre régional valide, définissez-le |
1788 | 1788 | // aux paramètres régionaux par défaut du site. |
1789 | - if (! in_array($locale, $validLocales, true)) { |
|
1789 | + if (!in_array($locale, $validLocales, true)) { |
|
1790 | 1790 | $locale = config('app.language'); |
1791 | 1791 | } |
1792 | 1792 | |
@@ -1886,7 +1886,7 @@ discard block |
||
1886 | 1886 | $override = true; |
1887 | 1887 | } |
1888 | 1888 | |
1889 | - if ($override && ! in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
1889 | + if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
1890 | 1890 | $data = []; |
1891 | 1891 | } |
1892 | 1892 | |
@@ -1936,7 +1936,7 @@ discard block |
||
1936 | 1936 | */ |
1937 | 1937 | protected function _processFiles(array $post, array $files): array |
1938 | 1938 | { |
1939 | - if (! is_array($files)) { |
|
1939 | + if (!is_array($files)) { |
|
1940 | 1940 | return $post; |
1941 | 1941 | } |
1942 | 1942 |