@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $controller = $routes->getDefaultController(); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - if (! $fullName && is_string($controller)) { |
|
| 175 | + if (!$fullName && is_string($controller)) { |
|
| 176 | 176 | $controller = str_replace($routes->getDefaultNamespace(), '', $controller); |
| 177 | 177 | } |
| 178 | 178 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | require_once $routes_file; |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | - if (empty($routes) || ! ($routes instanceof RouteCollection)) { |
|
| 274 | + if (empty($routes) || !($routes instanceof RouteCollection)) { |
|
| 275 | 275 | $routes = Services::routes(); |
| 276 | 276 | } |
| 277 | 277 | |
@@ -281,14 +281,14 @@ discard block |
||
| 281 | 281 | $routeMiddlewares = (array) $this->dispatchRoutes($routes); |
| 282 | 282 | |
| 283 | 283 | // The bootstrapping in a middleware |
| 284 | - $this->middleware->append(function (ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
| 284 | + $this->middleware->append(function(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
| 285 | 285 | $returned = $this->startController($request, $response); |
| 286 | 286 | |
| 287 | 287 | // Closure controller has run in startController(). |
| 288 | - if (! is_callable($this->controller)) { |
|
| 288 | + if (!is_callable($this->controller)) { |
|
| 289 | 289 | $controller = $this->createController($request, $response); |
| 290 | 290 | |
| 291 | - if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) { |
|
| 291 | + if (!method_exists($controller, '_remap') && !is_callable([$controller, $this->method], false)) { |
|
| 292 | 292 | throw PageNotFoundException::methodNotFound($this->method); |
| 293 | 293 | } |
| 294 | 294 | |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | */ |
| 327 | 327 | $this->gatherOutput($this->middleware->handle($this->request)); |
| 328 | 328 | |
| 329 | - if (! $returnResponse) { |
|
| 329 | + if (!$returnResponse) { |
|
| 330 | 330 | $this->sendResponse(); |
| 331 | 331 | } |
| 332 | 332 | |
@@ -374,14 +374,14 @@ discard block |
||
| 374 | 374 | return; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | - if (is_cli() && ! on_test()) { |
|
| 377 | + if (is_cli() && !on_test()) { |
|
| 378 | 378 | // @codeCoverageIgnoreStart |
| 379 | 379 | // $this->request = Services::clirequest($this->config); |
| 380 | 380 | // @codeCoverageIgnoreEnd |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; |
| 384 | - if (! is_numeric($version)) { |
|
| 384 | + if (!is_numeric($version)) { |
|
| 385 | 385 | $version = substr($version, strpos($version, '/') + 1); |
| 386 | 386 | } |
| 387 | 387 | |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | // Supposons le succès jusqu'à preuve du contraire. |
| 401 | 401 | $this->response = Services::response()->withStatus(200); |
| 402 | 402 | |
| 403 | - if (! is_cli() || on_test()) { |
|
| 403 | + if (!is_cli() || on_test()) { |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion()); |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | { |
| 437 | 437 | if ($cachedResponse = Services::cache()->read($this->generateCacheName())) { |
| 438 | 438 | $cachedResponse = unserialize($cachedResponse); |
| 439 | - if (! is_array($cachedResponse) || ! isset($cachedResponse['output']) || ! isset($cachedResponse['headers'])) { |
|
| 439 | + if (!is_array($cachedResponse) || !isset($cachedResponse['output']) || !isset($cachedResponse['headers'])) { |
|
| 440 | 440 | throw new FrameworkException('Error unserializing page cache'); |
| 441 | 441 | } |
| 442 | 442 | |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | */ |
| 566 | 566 | protected function determinePath(): string |
| 567 | 567 | { |
| 568 | - if (! empty($this->path)) { |
|
| 568 | + if (!empty($this->path)) { |
|
| 569 | 569 | return $this->path; |
| 570 | 570 | } |
| 571 | 571 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | } |
| 618 | 618 | |
| 619 | 619 | // Essayez de charger automatiquement la classe |
| 620 | - if (! class_exists($this->controller, true) || $this->method[0] === '_') { |
|
| 620 | + if (!class_exists($this->controller, true) || $this->method[0] === '_') { |
|
| 621 | 621 | throw PageNotFoundException::controllerNotFound($this->controller, $this->method); |
| 622 | 622 | } |
| 623 | 623 | |
@@ -705,7 +705,7 @@ discard block |
||
| 705 | 705 | // Affiche l'erreur 404 |
| 706 | 706 | $this->response = $this->response->withStatus($e->getCode()); |
| 707 | 707 | |
| 708 | - if (! on_test()) { |
|
| 708 | + if (!on_test()) { |
|
| 709 | 709 | // @codeCoverageIgnoreStart |
| 710 | 710 | if (ob_get_level() > 0) { |
| 711 | 711 | ob_end_flush(); |
@@ -717,7 +717,7 @@ discard block |
||
| 717 | 717 | ob_end_flush(); // @codeCoverageIgnore |
| 718 | 718 | } |
| 719 | 719 | |
| 720 | - throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 720 | + throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | /** |
@@ -772,7 +772,7 @@ discard block |
||
| 772 | 772 | public function storePreviousURL($uri) |
| 773 | 773 | { |
| 774 | 774 | // Ignorer les requêtes CLI |
| 775 | - if (is_cli() && ! on_test()) { |
|
| 775 | + if (is_cli() && !on_test()) { |
|
| 776 | 776 | return; // @codeCoverageIgnore |
| 777 | 777 | } |
| 778 | 778 | |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | $this->middleware->prepend($this->spoofRequestMethod()); |
| 837 | 837 | |
| 838 | 838 | $middlewaresFile = CONFIG_PATH . 'middlewares.php'; |
| 839 | - if (file_exists($middlewaresFile) && ! in_array($middlewaresFile, get_included_files(), true)) { |
|
| 839 | + if (file_exists($middlewaresFile) && !in_array($middlewaresFile, get_included_files(), true)) { |
|
| 840 | 840 | $middleware = require $middlewaresFile; |
| 841 | 841 | if (is_callable($middleware)) { |
| 842 | 842 | $middlewareQueue = $middleware($this->middleware, $this->request); |
@@ -853,11 +853,11 @@ discard block |
||
| 853 | 853 | */ |
| 854 | 854 | private function spoofRequestMethod(): callable |
| 855 | 855 | { |
| 856 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 856 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 857 | 857 | $post = $request->getParsedBody(); |
| 858 | 858 | |
| 859 | 859 | // Ne fonctionne qu'avec les formulaires POST |
| 860 | - if (strtoupper($request->getMethod()) === 'POST' && ! empty($post['_method'])) { |
|
| 860 | + if (strtoupper($request->getMethod()) === 'POST' && !empty($post['_method'])) { |
|
| 861 | 861 | // Accepte seulement PUT, PATCH, DELETE |
| 862 | 862 | if (in_array(strtoupper($post['_method']), ['PUT', 'PATCH', 'DELETE'], true)) { |
| 863 | 863 | $request = $request->withMethod($post['_method']); |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | if ($options['preferApp'] === true) { |
| 150 | - // $model = self::getBasename($model); |
|
| 150 | + // $model = self::getBasename($model); |
|
| 151 | 151 | |
| 152 | 152 | $model = str_replace(APP_NAMESPACE . '\\Models\\', '', $model); |
| 153 | 153 | $model = APP_NAMESPACE . '\\Models\\' . $model; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | foreach ($paths as $path) { |
| 45 | 45 | if (file_exists($path)) { |
| 46 | - if (! in_array($path, get_included_files(), true)) { |
|
| 46 | + if (!in_array($path, get_included_files(), true)) { |
|
| 47 | 47 | $languages = array_merge($languages, (array) require($path)); |
| 48 | 48 | } |
| 49 | 49 | $file_exist = true; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | throw LoadException::libraryNotFound($lib); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (true !== $file_syst && ! class_exists($lib)) { |
|
| 123 | + if (true !== $file_syst && !class_exists($lib)) { |
|
| 124 | 124 | throw LoadException::libraryDontExist($lib); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | 'preferApp' => true |
| 143 | 143 | ], $options); |
| 144 | 144 | |
| 145 | - if (! preg_match('#Model$#', $model)) { |
|
| 145 | + if (!preg_match('#Model$#', $model)) { |
|
| 146 | 146 | $model .= 'Model'; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | $model = APP_NAMESPACE . '\\Models\\' . $model; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - if (! class_exists($model)) { |
|
| 156 | + if (!class_exists($model)) { |
|
| 157 | 157 | throw LoadException::modelNotFound($model); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $controller = explode('/', $controller); |
| 172 | 172 | |
| 173 | 173 | $con = ucfirst(end($controller)); |
| 174 | - $con = (! preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con; |
|
| 174 | + $con = (!preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con; |
|
| 175 | 175 | $controller[count($controller) - 1] = $con; |
| 176 | 176 | |
| 177 | 177 | foreach ($controller as $key => &$value) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | $path = CONTROLLER_PATH . Helpers::ensureExt(implode(DS, $controller), 'php'); |
| 184 | 184 | |
| 185 | - if (! file_exists($path)) { |
|
| 185 | + if (!file_exists($path)) { |
|
| 186 | 186 | throw LoadException::controllerNotFound(str_replace('Controller', '', $con), $path); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | if (class_exists($class_namespaced, false)) { |
| 194 | 194 | return Injector::make($class_namespaced); |
| 195 | 195 | } |
| 196 | - if (! class_exists($con, false)) { |
|
| 196 | + if (!class_exists($con, false)) { |
|
| 197 | 197 | throw LoadException::controllerDontExist(str_replace('Controller', '', $con), $path); |
| 198 | 198 | } |
| 199 | 199 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | protected static function verifyPreferApp(array $options, string $name): bool |
| 223 | 223 | { |
| 224 | 224 | // Tout element sans restriction passe |
| 225 | - if (! $options['preferApp']) { |
|
| 225 | + if (!$options['preferApp']) { |
|
| 226 | 226 | return true; |
| 227 | 227 | } |
| 228 | 228 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | $this->cookies = $config['cookies']; |
| 258 | 258 | |
| 259 | 259 | if (isset($config['uri'])) { |
| 260 | - if (! $config['uri'] instanceof UriInterface) { |
|
| 260 | + if (!$config['uri'] instanceof UriInterface) { |
|
| 261 | 261 | throw new FrameworkException('The `uri` key must be an instance of ' . UriInterface::class); |
| 262 | 262 | } |
| 263 | 263 | $uri = $config['uri']; |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | $ref = $this->getEnv('HTTP_REFERER'); |
| 398 | 398 | |
| 399 | 399 | $base = /* Configure::read('App.fullBaseUrl') . */ $this->webroot; |
| 400 | - if (! empty($ref) && ! empty($base)) { |
|
| 400 | + if (!empty($ref) && !empty($base)) { |
|
| 401 | 401 | if ($local && strpos($ref, $base) === 0) { |
| 402 | 402 | $ref = substr($ref, strlen($base)); |
| 403 | 403 | if ($ref === '' || strpos($ref, '//') === 0) { |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | |
| 410 | 410 | return $ref; |
| 411 | 411 | } |
| 412 | - if (! $local) { |
|
| 412 | + if (!$local) { |
|
| 413 | 413 | return $ref; |
| 414 | 414 | } |
| 415 | 415 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | $type = strtolower($type); |
| 464 | - if (! isset(static::$_detectors[$type])) { |
|
| 464 | + if (!isset(static::$_detectors[$type])) { |
|
| 465 | 465 | return false; |
| 466 | 466 | } |
| 467 | 467 | if ($args) { |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | foreach ($detect['header'] as $header => $value) { |
| 541 | 541 | $header = $this->getEnv('http_' . $header); |
| 542 | 542 | if ($header !== null) { |
| 543 | - if (! is_string($value) && ! is_bool($value) && is_callable($value)) { |
|
| 543 | + if (!is_string($value) && !is_bool($value) && is_callable($value)) { |
|
| 544 | 544 | return $value($header); |
| 545 | 545 | } |
| 546 | 546 | |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | public function isAll(array $types): bool |
| 614 | 614 | { |
| 615 | 615 | foreach ($types as $type) { |
| 616 | - if (! $this->is($type)) { |
|
| 616 | + if (!$this->is($type)) { |
|
| 617 | 617 | return false; |
| 618 | 618 | } |
| 619 | 619 | } |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | protected function normalizeHeaderName(string $name): string |
| 717 | 717 | { |
| 718 | 718 | $name = str_replace('-', '_', strtoupper($name)); |
| 719 | - if (! in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
| 719 | + if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
| 720 | 720 | $name = 'HTTP_' . $name; |
| 721 | 721 | } |
| 722 | 722 | |
@@ -899,8 +899,8 @@ discard block |
||
| 899 | 899 | $new = clone $this; |
| 900 | 900 | |
| 901 | 901 | if ( |
| 902 | - ! is_string($method) |
|
| 903 | - || ! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method) |
|
| 902 | + !is_string($method) |
|
| 903 | + || !preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method) |
|
| 904 | 904 | ) { |
| 905 | 905 | throw new InvalidArgumentException(sprintf( |
| 906 | 906 | 'Unsupported HTTP method "%s" provided', |
@@ -1144,7 +1144,7 @@ discard block |
||
| 1144 | 1144 | } |
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | - if (! isset($accept[$prefValue])) { |
|
| 1147 | + if (!isset($accept[$prefValue])) { |
|
| 1148 | 1148 | $accept[$prefValue] = []; |
| 1149 | 1149 | } |
| 1150 | 1150 | if ($prefValue) { |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | if ($name === null) { |
| 1223 | 1223 | return $this->data; |
| 1224 | 1224 | } |
| 1225 | - if (! is_array($this->data) && $name) { |
|
| 1225 | + if (!is_array($this->data) && $name) { |
|
| 1226 | 1226 | return $default; |
| 1227 | 1227 | } |
| 1228 | 1228 | |
@@ -1363,7 +1363,7 @@ discard block |
||
| 1363 | 1363 | */ |
| 1364 | 1364 | public function withProtocolVersion($version): self |
| 1365 | 1365 | { |
| 1366 | - if (! preg_match('/^(1\.[01]|2)$/', $version)) { |
|
| 1366 | + if (!preg_match('/^(1\.[01]|2)$/', $version)) { |
|
| 1367 | 1367 | throw new InvalidArgumentException("Unsupported protocol version '{$version}' provided"); |
| 1368 | 1368 | } |
| 1369 | 1369 | $new = clone $this; |
@@ -1385,7 +1385,7 @@ discard block |
||
| 1385 | 1385 | public function getEnv(string $key, ?string $default = null): ?string |
| 1386 | 1386 | { |
| 1387 | 1387 | $key = strtoupper($key); |
| 1388 | - if (! array_key_exists($key, $this->_environment)) { |
|
| 1388 | + if (!array_key_exists($key, $this->_environment)) { |
|
| 1389 | 1389 | $this->_environment[$key] = env($key); |
| 1390 | 1390 | } |
| 1391 | 1391 | |
@@ -1597,7 +1597,7 @@ discard block |
||
| 1597 | 1597 | $file = Arr::get($this->uploadedFiles, $path); |
| 1598 | 1598 | if (is_array($file)) { |
| 1599 | 1599 | foreach ($file as $f) { |
| 1600 | - if (! ($f instanceof UploadedFile)) { |
|
| 1600 | + if (!($f instanceof UploadedFile)) { |
|
| 1601 | 1601 | return null; |
| 1602 | 1602 | } |
| 1603 | 1603 | } |
@@ -1605,7 +1605,7 @@ discard block |
||
| 1605 | 1605 | return $file; |
| 1606 | 1606 | } |
| 1607 | 1607 | |
| 1608 | - if (! ($file instanceof UploadedFileInterface)) { |
|
| 1608 | + if (!($file instanceof UploadedFileInterface)) { |
|
| 1609 | 1609 | return null; |
| 1610 | 1610 | } |
| 1611 | 1611 | |
@@ -1653,7 +1653,7 @@ discard block |
||
| 1653 | 1653 | continue; |
| 1654 | 1654 | } |
| 1655 | 1655 | |
| 1656 | - if (! $file instanceof UploadedFileInterface) { |
|
| 1656 | + if (!$file instanceof UploadedFileInterface) { |
|
| 1657 | 1657 | throw new InvalidArgumentException("Invalid file at '{$path}{$key}'"); |
| 1658 | 1658 | } |
| 1659 | 1659 | } |
@@ -1704,7 +1704,7 @@ discard block |
||
| 1704 | 1704 | } |
| 1705 | 1705 | |
| 1706 | 1706 | $host = $uri->getHost(); |
| 1707 | - if (! $host) { |
|
| 1707 | + if (!$host) { |
|
| 1708 | 1708 | return $new; |
| 1709 | 1709 | } |
| 1710 | 1710 | $port = $uri->getPort(); |
@@ -1812,7 +1812,7 @@ discard block |
||
| 1812 | 1812 | $validLocales = config('app.supported_locales'); |
| 1813 | 1813 | // S'il ne s'agit pas d'un paramètre régional valide, définissez-le |
| 1814 | 1814 | // aux paramètres régionaux par défaut du site. |
| 1815 | - if (! in_array($locale, $validLocales, true)) { |
|
| 1815 | + if (!in_array($locale, $validLocales, true)) { |
|
| 1816 | 1816 | $locale = config('app.language'); |
| 1817 | 1817 | } |
| 1818 | 1818 | |
@@ -1912,7 +1912,7 @@ discard block |
||
| 1912 | 1912 | $override = true; |
| 1913 | 1913 | } |
| 1914 | 1914 | |
| 1915 | - if ($override && ! in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
| 1915 | + if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
| 1916 | 1916 | $data = []; |
| 1917 | 1917 | } |
| 1918 | 1918 | |
@@ -1961,7 +1961,7 @@ discard block |
||
| 1961 | 1961 | */ |
| 1962 | 1962 | protected function _processFiles(array $post, array $files): array |
| 1963 | 1963 | { |
| 1964 | - if (! is_array($files)) { |
|
| 1964 | + if (!is_array($files)) { |
|
| 1965 | 1965 | return $post; |
| 1966 | 1966 | } |
| 1967 | 1967 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $this->renderVars['file'] = str_replace('/', DS, rtrim($options['viewPath'] ?? $this->viewPath, '/\\') . DS . ltrim($this->renderVars['view'], '/\\')); |
| 127 | 127 | |
| 128 | - if (! is_file($this->renderVars['file'])) { |
|
| 128 | + if (!is_file($this->renderVars['file'])) { |
|
| 129 | 129 | throw ViewException::invalidFile($this->renderVars['view']); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | // Enregistrer les variables actuelles |
| 136 | 136 | $renderVars = $this->renderVars; |
| 137 | 137 | |
| 138 | - $output = (function (): string { |
|
| 138 | + $output = (function(): string { |
|
| 139 | 139 | extract($this->tempData); |
| 140 | 140 | ob_start(); |
| 141 | 141 | include $this->renderVars['file']; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']); |
| 163 | 163 | |
| 164 | - if (($this->debug && (! isset($options['debug']) || $options['debug'] === true))) { |
|
| 164 | + if (($this->debug && (!isset($options['debug']) || $options['debug'] === true))) { |
|
| 165 | 165 | // Nettoyer nos noms de chemins pour les rendre un peu plus propres |
| 166 | 166 | $this->renderVars['file'] = clean_path($this->renderVars['file']); |
| 167 | 167 | $this->renderVars['file'] = ++$this->viewsCount . ' ' . $this->renderVars['file']; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $saveData ??= $this->saveData; |
| 191 | 191 | $this->prepareTemplateData($saveData); |
| 192 | 192 | |
| 193 | - $output = (function (string $view): string { |
|
| 193 | + $output = (function(string $view): string { |
|
| 194 | 194 | extract($this->tempData); |
| 195 | 195 | ob_start(); |
| 196 | 196 | eval('?>' . $view); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $section = array_pop($this->sectionStack); |
| 319 | 319 | |
| 320 | 320 | // Assurez-vous qu'un tableau existe afin que nous puissions stocker plusieurs entrées pour cela. |
| 321 | - if (! array_key_exists($section, $this->sections)) { |
|
| 321 | + if (!array_key_exists($section, $this->sections)) { |
|
| 322 | 322 | $this->sections[$section] = []; |
| 323 | 323 | } |
| 324 | 324 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | */ |
| 355 | 355 | public function show(string $sectionName) |
| 356 | 356 | { |
| 357 | - if (! isset($this->sections[$sectionName])) { |
|
| 357 | + if (!isset($this->sections[$sectionName])) { |
|
| 358 | 358 | echo ''; |
| 359 | 359 | |
| 360 | 360 | return; |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * |
| 424 | 424 | * @param mixed $saveData |
| 425 | 425 | */ |
| 426 | - public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true): string |
|
| 426 | + public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true) : string |
|
| 427 | 427 | { |
| 428 | 428 | return $this->insert($view, $data, $options, $saveData); |
| 429 | 429 | } |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | public function addLibCss(string ...$src): self |
| 435 | 435 | { |
| 436 | 436 | foreach ($src as $var) { |
| 437 | - if (! in_array($var, $this->_lib_styles, true)) { |
|
| 437 | + if (!in_array($var, $this->_lib_styles, true)) { |
|
| 438 | 438 | $this->_lib_styles[] = $var; |
| 439 | 439 | } |
| 440 | 440 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | public function addCss(string ...$src): self |
| 449 | 449 | { |
| 450 | 450 | foreach ($src as $var) { |
| 451 | - if (! in_array($var, $this->_styles, true)) { |
|
| 451 | + if (!in_array($var, $this->_styles, true)) { |
|
| 452 | 452 | $this->_styles[] = $var; |
| 453 | 453 | } |
| 454 | 454 | } |
@@ -477,10 +477,10 @@ discard block |
||
| 477 | 477 | ); |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | - if (! empty($lib_styles)) { |
|
| 480 | + if (!empty($lib_styles)) { |
|
| 481 | 481 | lib_styles(array_unique($lib_styles)); |
| 482 | 482 | } |
| 483 | - if (! empty($styles)) { |
|
| 483 | + if (!empty($styles)) { |
|
| 484 | 484 | styles(array_unique($styles)); |
| 485 | 485 | } |
| 486 | 486 | |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | public function addLibJs(string ...$src): self |
| 494 | 494 | { |
| 495 | 495 | foreach ($src as $var) { |
| 496 | - if (! in_array($var, $this->_lib_scripts, true)) { |
|
| 496 | + if (!in_array($var, $this->_lib_scripts, true)) { |
|
| 497 | 497 | $this->_lib_scripts[] = $var; |
| 498 | 498 | } |
| 499 | 499 | } |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | public function addJs(string ...$src): self |
| 508 | 508 | { |
| 509 | 509 | foreach ($src as $var) { |
| 510 | - if (! in_array($var, $this->_scripts, true)) { |
|
| 510 | + if (!in_array($var, $this->_scripts, true)) { |
|
| 511 | 511 | $this->_scripts[] = $var; |
| 512 | 512 | } |
| 513 | 513 | } |
@@ -536,10 +536,10 @@ discard block |
||
| 536 | 536 | ); |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | - if (! empty($lib_scripts)) { |
|
| 539 | + if (!empty($lib_scripts)) { |
|
| 540 | 540 | lib_scripts(array_unique($lib_scripts)); |
| 541 | 541 | } |
| 542 | - if (! empty($scripts)) { |
|
| 542 | + if (!empty($scripts)) { |
|
| 543 | 543 | scripts(array_unique($scripts)); |
| 544 | 544 | } |
| 545 | 545 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'AllowMethods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], |
| 29 | 29 | 'AllowHeaders' => true, |
| 30 | 30 | 'ExposeHeaders' => false, |
| 31 | - 'MaxAge' => 86400, // 1 day |
|
| 31 | + 'MaxAge' => 86400, // 1 day |
|
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | /** |