@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $controller = $routes->getDefaultController(); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if (! $fullName && is_string($controller)) { |
|
| 180 | + if (!$fullName && is_string($controller)) { |
|
| 181 | 181 | $controller = str_replace($routes->getDefaultNamespace(), '', $controller); |
| 182 | 182 | } |
| 183 | 183 | |
@@ -303,14 +303,14 @@ discard block |
||
| 303 | 303 | return; |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | - if (is_cli() && ! on_test()) { |
|
| 306 | + if (is_cli() && !on_test()) { |
|
| 307 | 307 | // @codeCoverageIgnoreStart |
| 308 | 308 | // $this->request = Services::clirequest($this->config); |
| 309 | 309 | // @codeCoverageIgnoreEnd |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; |
| 313 | - if (! is_numeric($version)) { |
|
| 313 | + if (!is_numeric($version)) { |
|
| 314 | 314 | $version = substr($version, strpos($version, '/') + 1); |
| 315 | 315 | } |
| 316 | 316 | |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | // Supposons le succès jusqu'à preuve du contraire. |
| 330 | 330 | $this->response = Services::response()->withStatus(200); |
| 331 | 331 | |
| 332 | - if (! is_cli() || on_test()) { |
|
| 332 | + if (!is_cli() || on_test()) { |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion()); |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | // Essayez de charger automatiquement la classe |
| 429 | - if (! class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) { |
|
| 429 | + if (!class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) { |
|
| 430 | 430 | throw PageNotFoundException::controllerNotFound($this->controller, $this->method); |
| 431 | 431 | } |
| 432 | 432 | |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | |
| 516 | 516 | $this->outputBufferingEnd(); |
| 517 | 517 | |
| 518 | - throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 518 | + throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | /** |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | public function storePreviousURL($uri) |
| 558 | 558 | { |
| 559 | 559 | // Ignorer les requêtes CLI |
| 560 | - if (is_cli() && ! on_test()) { |
|
| 560 | + if (is_cli() && !on_test()) { |
|
| 561 | 561 | return; // @codeCoverageIgnore |
| 562 | 562 | } |
| 563 | 563 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | // Ignorer les reponses non-HTML |
| 570 | - if (! str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) { |
|
| 570 | + if (!str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) { |
|
| 571 | 571 | return; |
| 572 | 572 | } |
| 573 | 573 | |
@@ -678,11 +678,11 @@ discard block |
||
| 678 | 678 | */ |
| 679 | 679 | private function spoofRequestMethod(): callable |
| 680 | 680 | { |
| 681 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 681 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 682 | 682 | $post = $request->getParsedBody(); |
| 683 | 683 | |
| 684 | 684 | // Ne fonctionne qu'avec les formulaires POST |
| 685 | - if ($request->getMethod() === 'POST' && ! empty($post['_method'])) { |
|
| 685 | + if ($request->getMethod() === 'POST' && !empty($post['_method'])) { |
|
| 686 | 686 | // Accepte seulement PUT, PATCH, DELETE |
| 687 | 687 | if (in_array($post['_method'], ['PUT', 'PATCH', 'DELETE'], true)) { |
| 688 | 688 | $request = $request->withMethod($post['_method']); |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | |
| 696 | 696 | private function bootApp(): callable |
| 697 | 697 | { |
| 698 | - return function (ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
| 698 | + return function(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
| 699 | 699 | Services::set(Request::class, $request); |
| 700 | 700 | Services::set(Response::class, $response); |
| 701 | 701 | |
@@ -703,10 +703,10 @@ discard block |
||
| 703 | 703 | $returned = $this->startController(); |
| 704 | 704 | |
| 705 | 705 | // Les controleur sous forme de Closure sont executes dans startController(). |
| 706 | - if (! is_callable($this->controller)) { |
|
| 706 | + if (!is_callable($this->controller)) { |
|
| 707 | 707 | $controller = $this->createController($request, $response); |
| 708 | 708 | |
| 709 | - if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) { |
|
| 709 | + if (!method_exists($controller, '_remap') && !is_callable([$controller, $this->method], false)) { |
|
| 710 | 710 | throw PageNotFoundException::methodNotFound($this->method); |
| 711 | 711 | } |
| 712 | 712 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | // ================================= FONCTIONS UTIILITAIRES ESSENTIELLES ================================= // |
| 30 | 30 | |
| 31 | -if (! function_exists('env')) { |
|
| 31 | +if (!function_exists('env')) { |
|
| 32 | 32 | /** |
| 33 | 33 | * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation |
| 34 | 34 | * pour les variables d'environnement non prises en charge ou incohérentes |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | -if (! function_exists('helper')) { |
|
| 47 | +if (!function_exists('helper')) { |
|
| 48 | 48 | /** |
| 49 | 49 | * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms, |
| 50 | 50 | * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms. |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | -if (! function_exists('model')) { |
|
| 63 | +if (!function_exists('model')) { |
|
| 64 | 64 | /** |
| 65 | 65 | * Simple maniere d'obtenir un modele. |
| 66 | 66 | * |
@@ -70,13 +70,13 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return T |
| 72 | 72 | */ |
| 73 | - function model(array|string $name, ?ConnectionInterface &$conn = null) |
|
| 73 | + function model(array|string $name, ?ConnectionInterface&$conn = null) |
|
| 74 | 74 | { |
| 75 | 75 | return Load::model($name, $conn); |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | -if (! function_exists('service')) { |
|
| 79 | +if (!function_exists('service')) { |
|
| 80 | 80 | /** |
| 81 | 81 | * Permet un accès plus propre au fichier de configuration des services. |
| 82 | 82 | * Renvoie toujours une instance SHARED de la classe, donc l'appel de la fonction plusieurs fois renvera toujours la même instance. |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | -if (! function_exists('single_service')) { |
|
| 100 | +if (!function_exists('single_service')) { |
|
| 101 | 101 | /** |
| 102 | 102 | * Autoriser l'accès propre à un service. |
| 103 | 103 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | -if (! function_exists('show404')) { |
|
| 120 | +if (!function_exists('show404')) { |
|
| 121 | 121 | /** |
| 122 | 122 | * Afficher une page 404 introuvable dans le navigateur |
| 123 | 123 | */ |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | -if (! function_exists('command')) { |
|
| 130 | +if (!function_exists('command')) { |
|
| 131 | 131 | /** |
| 132 | 132 | * Exécute une seule commande. |
| 133 | 133 | * Entrée attendue dans une seule chaîne comme celle qui serait utilisée sur la ligne de commande elle-même : |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | -if (! function_exists('config')) { |
|
| 192 | +if (!function_exists('config')) { |
|
| 193 | 193 | /** |
| 194 | 194 | * GET/SET App config |
| 195 | 195 | * |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | -if (! function_exists('logger')) { |
|
| 220 | +if (!function_exists('logger')) { |
|
| 221 | 221 | /** |
| 222 | 222 | * Une méthode de commodité pour les événements de journalisation via le système Log. |
| 223 | 223 | * |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | -if (! function_exists('cache')) { |
|
| 250 | +if (!function_exists('cache')) { |
|
| 251 | 251 | /** |
| 252 | 252 | * Une méthode pratique qui donne accès au cache |
| 253 | 253 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | } |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | -if (! function_exists('cookie')) { |
|
| 280 | +if (!function_exists('cookie')) { |
|
| 281 | 281 | /** |
| 282 | 282 | * Une méthode pratique qui donne accès à l'objet cookie. |
| 283 | 283 | * Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | -if (! function_exists('session')) { |
|
| 308 | +if (!function_exists('session')) { |
|
| 309 | 309 | /** |
| 310 | 310 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
| 311 | 311 | * |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | |
| 331 | 331 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
| 332 | 332 | |
| 333 | -if (! function_exists('esc')) { |
|
| 333 | +if (!function_exists('esc')) { |
|
| 334 | 334 | /** |
| 335 | 335 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
| 336 | 336 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | } |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | -if (! function_exists('h')) { |
|
| 360 | +if (!function_exists('h')) { |
|
| 361 | 361 | /** |
| 362 | 362 | * Méthode pratique pour htmlspecialchars. |
| 363 | 363 | * |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | } |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | -if (! function_exists('purify')) { |
|
| 379 | +if (!function_exists('purify')) { |
|
| 380 | 380 | /** |
| 381 | 381 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
| 382 | 382 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | } |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | -if (! function_exists('remove_invisible_characters')) { |
|
| 395 | +if (!function_exists('remove_invisible_characters')) { |
|
| 396 | 396 | /** |
| 397 | 397 | * Supprimer les caractères invisibles |
| 398 | 398 | * |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | } |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | -if (! function_exists('stringify_attributes')) { |
|
| 408 | +if (!function_exists('stringify_attributes')) { |
|
| 409 | 409 | /** |
| 410 | 410 | * Chaîner les attributs à utiliser dans les balises HTML. |
| 411 | 411 | * |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | |
| 420 | 420 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
| 421 | 421 | |
| 422 | -if (! function_exists('environment')) { |
|
| 422 | +if (!function_exists('environment')) { |
|
| 423 | 423 | /** |
| 424 | 424 | * Renvoi l'environnement d'execution actuel ou determine si on est dans un environnement specifie |
| 425 | 425 | * |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | } |
| 458 | 458 | } |
| 459 | 459 | |
| 460 | -if (! function_exists('on_dev')) { |
|
| 460 | +if (!function_exists('on_dev')) { |
|
| 461 | 461 | /** |
| 462 | 462 | * Testez pour voir si nous sommes dans un environnement de développement. |
| 463 | 463 | */ |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | } |
| 472 | 472 | } |
| 473 | 473 | |
| 474 | -if (! function_exists('on_prod')) { |
|
| 474 | +if (!function_exists('on_prod')) { |
|
| 475 | 475 | /** |
| 476 | 476 | * Testez pour voir si nous sommes dans un environnement de production. |
| 477 | 477 | */ |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | } |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | -if (! function_exists('on_test')) { |
|
| 488 | +if (!function_exists('on_test')) { |
|
| 489 | 489 | /** |
| 490 | 490 | * Testez pour voir si nous sommes dans un environnement de test |
| 491 | 491 | */ |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | } |
| 496 | 496 | } |
| 497 | 497 | |
| 498 | -if (! function_exists('is_cli')) { |
|
| 498 | +if (!function_exists('is_cli')) { |
|
| 499 | 499 | /** |
| 500 | 500 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
| 501 | 501 | */ |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | } |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | -if (! function_exists('is_php')) { |
|
| 508 | +if (!function_exists('is_php')) { |
|
| 509 | 509 | /** |
| 510 | 510 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
| 511 | 511 | */ |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | } |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | -if (! function_exists('is_windows')) { |
|
| 518 | +if (!function_exists('is_windows')) { |
|
| 519 | 519 | /** |
| 520 | 520 | * Déterminez si l'environnement actuel est basé sur Windows. |
| 521 | 521 | */ |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | } |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | -if (! function_exists('is_https')) { |
|
| 528 | +if (!function_exists('is_https')) { |
|
| 529 | 529 | /** |
| 530 | 530 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
| 531 | 531 | */ |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | } |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | -if (! function_exists('is_localfile')) { |
|
| 538 | +if (!function_exists('is_localfile')) { |
|
| 539 | 539 | /** |
| 540 | 540 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
| 541 | 541 | */ |
@@ -545,11 +545,11 @@ discard block |
||
| 545 | 545 | return true; |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | - return ! preg_match('#^(https?://)#i', $name); |
|
| 548 | + return !preg_match('#^(https?://)#i', $name); |
|
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | -if (! function_exists('is_online')) { |
|
| 552 | +if (!function_exists('is_online')) { |
|
| 553 | 553 | /** |
| 554 | 554 | * Tester si l'application s'exécute en local ou en ligne. |
| 555 | 555 | */ |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | } |
| 560 | 560 | } |
| 561 | 561 | |
| 562 | -if (! function_exists('is_connected')) { |
|
| 562 | +if (!function_exists('is_connected')) { |
|
| 563 | 563 | /** |
| 564 | 564 | * Verifie si l'utilisateur a une connexion internet active. |
| 565 | 565 | */ |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | |
| 572 | -if (! function_exists('is_ajax_request')) { |
|
| 572 | +if (!function_exists('is_ajax_request')) { |
|
| 573 | 573 | /** |
| 574 | 574 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
| 575 | 575 | */ |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | } |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | -if (! function_exists('redirection')) { |
|
| 582 | +if (!function_exists('redirection')) { |
|
| 583 | 583 | /** |
| 584 | 584 | * Redirige l'utilisateur |
| 585 | 585 | */ |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | } |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | -if (! function_exists('redirect')) { |
|
| 596 | +if (!function_exists('redirect')) { |
|
| 597 | 597 | /** |
| 598 | 598 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
| 599 | 599 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | { |
| 608 | 608 | $redirection = Services::redirection(); |
| 609 | 609 | |
| 610 | - if (! empty($uri)) { |
|
| 610 | + if (!empty($uri)) { |
|
| 611 | 611 | return $redirection->route($uri); |
| 612 | 612 | } |
| 613 | 613 | |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | } |
| 616 | 616 | } |
| 617 | 617 | |
| 618 | -if (! function_exists('back')) { |
|
| 618 | +if (!function_exists('back')) { |
|
| 619 | 619 | /** |
| 620 | 620 | * Retourne a la page precedente |
| 621 | 621 | * |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | } |
| 628 | 628 | } |
| 629 | 629 | |
| 630 | -if (! function_exists('link_to')) { |
|
| 630 | +if (!function_exists('link_to')) { |
|
| 631 | 631 | /** |
| 632 | 632 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
| 633 | 633 | * tentera de créer l'URL relative à la route correspondante. |
@@ -647,7 +647,7 @@ discard block |
||
| 647 | 647 | } |
| 648 | 648 | } |
| 649 | 649 | |
| 650 | -if (! function_exists('clean_path')) { |
|
| 650 | +if (!function_exists('clean_path')) { |
|
| 651 | 651 | /** |
| 652 | 652 | * Une méthode pratique pour nettoyer les chemins pour |
| 653 | 653 | * une sortie plus belle. Utile pour les exceptions |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | } |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | -if (! function_exists('old')) { |
|
| 682 | +if (!function_exists('old')) { |
|
| 683 | 683 | /** |
| 684 | 684 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
| 685 | 685 | * |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | function old(string $key, $default = null, $escape = 'html') |
| 693 | 693 | { |
| 694 | 694 | // Assurez-vous de charger la session |
| 695 | - if (session_status() === PHP_SESSION_NONE && ! on_test()) { |
|
| 695 | + if (session_status() === PHP_SESSION_NONE && !on_test()) { |
|
| 696 | 696 | session(); // @codeCoverageIgnore |
| 697 | 697 | } |
| 698 | 698 | |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | |
| 708 | 708 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
| 709 | 709 | |
| 710 | -if (! function_exists('deprecationWarning')) { |
|
| 710 | +if (!function_exists('deprecationWarning')) { |
|
| 711 | 711 | /** |
| 712 | 712 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
| 713 | 713 | * |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | } |
| 724 | 724 | } |
| 725 | 725 | |
| 726 | -if (! function_exists('pr')) { |
|
| 726 | +if (!function_exists('pr')) { |
|
| 727 | 727 | /** |
| 728 | 728 | * print_r() convenience function. |
| 729 | 729 | * |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | } |
| 746 | 746 | } |
| 747 | 747 | |
| 748 | -if (! function_exists('pj')) { |
|
| 748 | +if (!function_exists('pj')) { |
|
| 749 | 749 | /** |
| 750 | 750 | * json pretty print convenience function. |
| 751 | 751 | * |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | } |
| 767 | 767 | } |
| 768 | 768 | |
| 769 | -if (! function_exists('trigger_warning')) { |
|
| 769 | +if (!function_exists('trigger_warning')) { |
|
| 770 | 770 | /** |
| 771 | 771 | * Déclenche un E_USER_WARNING. |
| 772 | 772 | */ |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | |
| 779 | 779 | // ================================= FONCTIONS DIVERSES ================================= // |
| 780 | 780 | |
| 781 | -if (! function_exists('force_https')) { |
|
| 781 | +if (!function_exists('force_https')) { |
|
| 782 | 782 | /** |
| 783 | 783 | * Utilisé pour forcer l'accès à une page via HTTPS. |
| 784 | 784 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -805,7 +805,7 @@ discard block |
||
| 805 | 805 | |
| 806 | 806 | // Si la session est active, nous devons régénérer |
| 807 | 807 | // l'ID de session pour des raisons de sécurité. |
| 808 | - if (! on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
| 808 | + if (!on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
| 809 | 809 | Services::session()->regenerate(); // @codeCoverageIgnore |
| 810 | 810 | } |
| 811 | 811 | |
@@ -821,7 +821,7 @@ discard block |
||
| 821 | 821 | } |
| 822 | 822 | } |
| 823 | 823 | |
| 824 | -if (! function_exists('get_type_name')) { |
|
| 824 | +if (!function_exists('get_type_name')) { |
|
| 825 | 825 | /** |
| 826 | 826 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
| 827 | 827 | * |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | } |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | -if (! function_exists('ip_address')) { |
|
| 838 | +if (!function_exists('ip_address')) { |
|
| 839 | 839 | /** |
| 840 | 840 | * Renvoie l'adresse IP de l'utilisateur actuel |
| 841 | 841 | */ |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | } |
| 846 | 846 | } |
| 847 | 847 | |
| 848 | -if (! function_exists('is_really_writable')) { |
|
| 848 | +if (!function_exists('is_really_writable')) { |
|
| 849 | 849 | /** |
| 850 | 850 | * Tests d'inscriptibilité des fichiers |
| 851 | 851 | */ |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | } |
| 856 | 856 | } |
| 857 | 857 | |
| 858 | -if (! function_exists('lang')) { |
|
| 858 | +if (!function_exists('lang')) { |
|
| 859 | 859 | /** |
| 860 | 860 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 861 | 861 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -866,7 +866,7 @@ discard block |
||
| 866 | 866 | } |
| 867 | 867 | } |
| 868 | 868 | |
| 869 | -if (! function_exists('__')) { |
|
| 869 | +if (!function_exists('__')) { |
|
| 870 | 870 | /** |
| 871 | 871 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 872 | 872 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -879,7 +879,7 @@ discard block |
||
| 879 | 879 | } |
| 880 | 880 | } |
| 881 | 881 | |
| 882 | -if (! function_exists('namespace_split')) { |
|
| 882 | +if (!function_exists('namespace_split')) { |
|
| 883 | 883 | /** |
| 884 | 884 | * Séparez l'espace de noms du nom de classe. |
| 885 | 885 | * |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | } |
| 901 | 901 | } |
| 902 | 902 | |
| 903 | -if (! function_exists('view_exist')) { |
|
| 903 | +if (!function_exists('view_exist')) { |
|
| 904 | 904 | /** |
| 905 | 905 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
| 906 | 906 | */ |
@@ -914,7 +914,7 @@ discard block |
||
| 914 | 914 | } |
| 915 | 915 | } |
| 916 | 916 | |
| 917 | -if (! function_exists('view')) { |
|
| 917 | +if (!function_exists('view')) { |
|
| 918 | 918 | /** |
| 919 | 919 | * Charge une vue |
| 920 | 920 | * |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | } |
| 931 | 931 | } |
| 932 | 932 | |
| 933 | -if (! function_exists('flash')) { |
|
| 933 | +if (!function_exists('flash')) { |
|
| 934 | 934 | /** |
| 935 | 935 | * Fournisseur d'acces rapide a la classe PHP Flash |
| 936 | 936 | * |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | }*/ |
| 963 | 963 | } |
| 964 | 964 | |
| 965 | -if (! function_exists('geo_ip')) { |
|
| 965 | +if (!function_exists('geo_ip')) { |
|
| 966 | 966 | /** |
| 967 | 967 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
| 968 | 968 | */ |
@@ -972,7 +972,7 @@ discard block |
||
| 972 | 972 | } |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | -if (! function_exists('to_stream')) { |
|
| 975 | +if (!function_exists('to_stream')) { |
|
| 976 | 976 | /** |
| 977 | 977 | * Créez un nouveau flux basé sur le type d'entrée. |
| 978 | 978 | * |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | -if (! function_exists('value')) { |
|
| 996 | +if (!function_exists('value')) { |
|
| 997 | 997 | /** |
| 998 | 998 | * Renvoie la valeur par défaut de la valeur donnée. |
| 999 | 999 | */ |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | } |
| 1004 | 1004 | } |
| 1005 | 1005 | |
| 1006 | -if (! function_exists('collect')) { |
|
| 1006 | +if (!function_exists('collect')) { |
|
| 1007 | 1007 | /** |
| 1008 | 1008 | * Créez une collection à partir de la valeur donnée. |
| 1009 | 1009 | */ |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | } |
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | -if (! function_exists('with')) { |
|
| 1016 | +if (!function_exists('with')) { |
|
| 1017 | 1017 | /** |
| 1018 | 1018 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
| 1019 | 1019 | * |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | } |
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | -if (! function_exists('tap')) { |
|
| 1028 | +if (!function_exists('tap')) { |
|
| 1029 | 1029 | /** |
| 1030 | 1030 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
| 1031 | 1031 | */ |
@@ -1035,7 +1035,7 @@ discard block |
||
| 1035 | 1035 | } |
| 1036 | 1036 | } |
| 1037 | 1037 | |
| 1038 | -if (! function_exists('last')) { |
|
| 1038 | +if (!function_exists('last')) { |
|
| 1039 | 1039 | /** |
| 1040 | 1040 | * Recupere le dernier element d'un tableau |
| 1041 | 1041 | */ |
@@ -1045,7 +1045,7 @@ discard block |
||
| 1045 | 1045 | } |
| 1046 | 1046 | } |
| 1047 | 1047 | |
| 1048 | -if (! function_exists('invade')) { |
|
| 1048 | +if (!function_exists('invade')) { |
|
| 1049 | 1049 | /** |
| 1050 | 1050 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
| 1051 | 1051 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $response = $handler->handle($request); |
| 28 | 28 | |
| 29 | - if (! empty($body = $response->getBody()->getContents())) { |
|
| 29 | + if (!empty($body = $response->getBody()->getContents())) { |
|
| 30 | 30 | $benchmark = Services::timer(); |
| 31 | 31 | |
| 32 | 32 | $output = str_replace( |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $response = $handler->handle($request); |
| 38 | 38 | $content = $response->getBody()->getContents(); |
| 39 | 39 | |
| 40 | - if (! $response instanceof Redirection) { |
|
| 40 | + if (!$response instanceof Redirection) { |
|
| 41 | 41 | // Mettez-le en cache sans remplacer les mesures de performances afin que nous puissions avoir des mises à jour de vitesse en direct en cours de route. |
| 42 | 42 | // Doit être exécuté après les filtres pour conserver les en-têtes de réponse. |
| 43 | 43 | $this->pageCache->make($request, $response->withBody(to_stream($content))); |