@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $possibleView2 = $directory . $viewName . '.php'; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if ($view !== '' && ! is_file($view)) { |
|
| 82 | + if ($view !== '' && !is_file($view)) { |
|
| 83 | 83 | $directory = dirname((new ReflectionClass($this))->getFileName()) . DIRECTORY_SEPARATOR; |
| 84 | 84 | |
| 85 | 85 | $view = $directory . $view . '.php'; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $foundView = current($candidateViews); |
| 101 | 101 | |
| 102 | - return (function () use ($properties, $foundView): string { |
|
| 102 | + return (function() use ($properties, $foundView): string { |
|
| 103 | 103 | extract($properties); |
| 104 | 104 | ob_start(); |
| 105 | 105 | include $foundView; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $key = $this->_key($key); |
| 75 | 75 | |
| 76 | - if (! isset($this->cache[$key])) { |
|
| 76 | + if (!isset($this->cache[$key])) { |
|
| 77 | 77 | return false; |
| 78 | 78 | } |
| 79 | 79 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | if ($data === null) { |
| 113 | 113 | $data = 0; |
| 114 | - } elseif (! is_int($data)) { |
|
| 114 | + } elseif (!is_int($data)) { |
|
| 115 | 115 | return false; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | if ($data === null) { |
| 131 | 131 | $data = 0; |
| 132 | - } elseif (! is_int($data)) { |
|
| 132 | + } elseif (!is_int($data)) { |
|
| 133 | 133 | return false; |
| 134 | 134 | } |
| 135 | 135 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | public function getMetaData(string $key): ?array |
| 175 | 175 | { |
| 176 | 176 | // n'existe pas, retourne null |
| 177 | - if (! array_key_exists($key, $this->expirations)) { |
|
| 177 | + if (!array_key_exists($key, $this->expirations)) { |
|
| 178 | 178 | return null; |
| 179 | 179 | } |
| 180 | 180 | |
@@ -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 : |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | -if (! function_exists('config')) { |
|
| 193 | +if (!function_exists('config')) { |
|
| 194 | 194 | /** |
| 195 | 195 | * GET/SET App config |
| 196 | 196 | * |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | } |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | -if (! function_exists('logger')) { |
|
| 221 | +if (!function_exists('logger')) { |
|
| 222 | 222 | /** |
| 223 | 223 | * Une méthode de commodité pour les événements de journalisation via le système Log. |
| 224 | 224 | * |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | -if (! function_exists('cache')) { |
|
| 251 | +if (!function_exists('cache')) { |
|
| 252 | 252 | /** |
| 253 | 253 | * Une méthode pratique qui donne accès au cache |
| 254 | 254 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | -if (! function_exists('cookie')) { |
|
| 281 | +if (!function_exists('cookie')) { |
|
| 282 | 282 | /** |
| 283 | 283 | * Une méthode pratique qui donne accès à l'objet cookie. |
| 284 | 284 | * Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | -if (! function_exists('session')) { |
|
| 309 | +if (!function_exists('session')) { |
|
| 310 | 310 | /** |
| 311 | 311 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
| 312 | 312 | * |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | |
| 332 | 332 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
| 333 | 333 | |
| 334 | -if (! function_exists('esc')) { |
|
| 334 | +if (!function_exists('esc')) { |
|
| 335 | 335 | /** |
| 336 | 336 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
| 337 | 337 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | } |
| 360 | 360 | |
| 361 | -if (! function_exists('h')) { |
|
| 361 | +if (!function_exists('h')) { |
|
| 362 | 362 | /** |
| 363 | 363 | * Méthode pratique pour htmlspecialchars. |
| 364 | 364 | * |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | } |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | -if (! function_exists('purify')) { |
|
| 380 | +if (!function_exists('purify')) { |
|
| 381 | 381 | /** |
| 382 | 382 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
| 383 | 383 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | -if (! function_exists('remove_invisible_characters')) { |
|
| 396 | +if (!function_exists('remove_invisible_characters')) { |
|
| 397 | 397 | /** |
| 398 | 398 | * Supprimer les caractères invisibles |
| 399 | 399 | * |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | -if (! function_exists('stringify_attributes')) { |
|
| 409 | +if (!function_exists('stringify_attributes')) { |
|
| 410 | 410 | /** |
| 411 | 411 | * Chaîner les attributs à utiliser dans les balises HTML. |
| 412 | 412 | * |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | // ================================= FONCTIONS DE FORMULAIRE ================================= // |
| 422 | 422 | |
| 423 | -if (! function_exists('csrf_token')) { |
|
| 423 | +if (!function_exists('csrf_token')) { |
|
| 424 | 424 | /** |
| 425 | 425 | * Renvoie la valeur de hachage actuelle pour la protection CSRF. |
| 426 | 426 | * Peut être utilisé dans les vues lors de la construction manuelle d'input cachées, ou utilisé dans les variables javascript pour l'utilisation de l'API. |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | |
| 434 | -if (! function_exists('csrf_field')) { |
|
| 434 | +if (!function_exists('csrf_field')) { |
|
| 435 | 435 | /** |
| 436 | 436 | * Génère un champ input caché à utiliser dans les formulaires générés manuellement. |
| 437 | 437 | */ |
@@ -439,11 +439,11 @@ discard block |
||
| 439 | 439 | { |
| 440 | 440 | $name = config('security.csrf_token_name', '_token'); |
| 441 | 441 | |
| 442 | - return '<input type="hidden"' . (! empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" value="' . csrf_token() . '">'; |
|
| 442 | + return '<input type="hidden"' . (!empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" value="' . csrf_token() . '">'; |
|
| 443 | 443 | } |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | -if (! function_exists('csrf_meta')) { |
|
| 446 | +if (!function_exists('csrf_meta')) { |
|
| 447 | 447 | /** |
| 448 | 448 | * Génère une balise méta à utiliser dans les appels javascript. |
| 449 | 449 | */ |
@@ -451,17 +451,17 @@ discard block |
||
| 451 | 451 | { |
| 452 | 452 | $name = config('security.csrf_header_name', 'X-CSRF-TOKEN'); |
| 453 | 453 | |
| 454 | - return '<meta' . (! empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" content="' . csrf_token() . '">'; |
|
| 454 | + return '<meta' . (!empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" content="' . csrf_token() . '">'; |
|
| 455 | 455 | } |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | -if (! function_exists('method_field')) { |
|
| 458 | +if (!function_exists('method_field')) { |
|
| 459 | 459 | /** |
| 460 | 460 | * Générer un champ de formulaire pour usurper le verbe HTTP utilisé par les formulaires. |
| 461 | 461 | */ |
| 462 | 462 | function method_field(string $method): string |
| 463 | 463 | { |
| 464 | - if (! in_array($method = strtoupper($method), ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
| 464 | + if (!in_array($method = strtoupper($method), ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
| 465 | 465 | throw new InvalidArgumentException(sprintf('Methode %s invalide', $method)); |
| 466 | 466 | } |
| 467 | 467 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | |
| 472 | 472 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
| 473 | 473 | |
| 474 | -if (! function_exists('environment')) { |
|
| 474 | +if (!function_exists('environment')) { |
|
| 475 | 475 | /** |
| 476 | 476 | * Renvoi l'environnement d'execution actuel ou determine si on est dans un environnement specifie |
| 477 | 477 | * |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | } |
| 510 | 510 | } |
| 511 | 511 | |
| 512 | -if (! function_exists('on_dev')) { |
|
| 512 | +if (!function_exists('on_dev')) { |
|
| 513 | 513 | /** |
| 514 | 514 | * Testez pour voir si nous sommes dans un environnement de développement. |
| 515 | 515 | */ |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | } |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | -if (! function_exists('on_prod')) { |
|
| 526 | +if (!function_exists('on_prod')) { |
|
| 527 | 527 | /** |
| 528 | 528 | * Testez pour voir si nous sommes dans un environnement de production. |
| 529 | 529 | */ |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | } |
| 538 | 538 | } |
| 539 | 539 | |
| 540 | -if (! function_exists('on_test')) { |
|
| 540 | +if (!function_exists('on_test')) { |
|
| 541 | 541 | /** |
| 542 | 542 | * Testez pour voir si nous sommes dans un environnement de test |
| 543 | 543 | */ |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | } |
| 548 | 548 | } |
| 549 | 549 | |
| 550 | -if (! function_exists('is_cli')) { |
|
| 550 | +if (!function_exists('is_cli')) { |
|
| 551 | 551 | /** |
| 552 | 552 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
| 553 | 553 | */ |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | } |
| 558 | 558 | } |
| 559 | 559 | |
| 560 | -if (! function_exists('is_php')) { |
|
| 560 | +if (!function_exists('is_php')) { |
|
| 561 | 561 | /** |
| 562 | 562 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
| 563 | 563 | */ |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | } |
| 568 | 568 | } |
| 569 | 569 | |
| 570 | -if (! function_exists('is_windows')) { |
|
| 570 | +if (!function_exists('is_windows')) { |
|
| 571 | 571 | /** |
| 572 | 572 | * Déterminez si l'environnement actuel est basé sur Windows. |
| 573 | 573 | */ |
@@ -577,7 +577,7 @@ discard block |
||
| 577 | 577 | } |
| 578 | 578 | } |
| 579 | 579 | |
| 580 | -if (! function_exists('is_https')) { |
|
| 580 | +if (!function_exists('is_https')) { |
|
| 581 | 581 | /** |
| 582 | 582 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
| 583 | 583 | */ |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | } |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | -if (! function_exists('is_localfile')) { |
|
| 590 | +if (!function_exists('is_localfile')) { |
|
| 591 | 591 | /** |
| 592 | 592 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
| 593 | 593 | */ |
@@ -597,11 +597,11 @@ discard block |
||
| 597 | 597 | return true; |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | - return ! preg_match('#^(https?://)#i', $name); |
|
| 600 | + return !preg_match('#^(https?://)#i', $name); |
|
| 601 | 601 | } |
| 602 | 602 | } |
| 603 | 603 | |
| 604 | -if (! function_exists('is_online')) { |
|
| 604 | +if (!function_exists('is_online')) { |
|
| 605 | 605 | /** |
| 606 | 606 | * Tester si l'application s'exécute en local ou en ligne. |
| 607 | 607 | */ |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | } |
| 612 | 612 | } |
| 613 | 613 | |
| 614 | -if (! function_exists('is_connected')) { |
|
| 614 | +if (!function_exists('is_connected')) { |
|
| 615 | 615 | /** |
| 616 | 616 | * Verifie si l'utilisateur a une connexion internet active. |
| 617 | 617 | */ |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | -if (! function_exists('is_ajax_request')) { |
|
| 624 | +if (!function_exists('is_ajax_request')) { |
|
| 625 | 625 | /** |
| 626 | 626 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
| 627 | 627 | */ |
@@ -631,7 +631,7 @@ discard block |
||
| 631 | 631 | } |
| 632 | 632 | } |
| 633 | 633 | |
| 634 | -if (! function_exists('redirection')) { |
|
| 634 | +if (!function_exists('redirection')) { |
|
| 635 | 635 | /** |
| 636 | 636 | * Redirige l'utilisateur |
| 637 | 637 | */ |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | } |
| 646 | 646 | } |
| 647 | 647 | |
| 648 | -if (! function_exists('redirect')) { |
|
| 648 | +if (!function_exists('redirect')) { |
|
| 649 | 649 | /** |
| 650 | 650 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
| 651 | 651 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -659,7 +659,7 @@ discard block |
||
| 659 | 659 | { |
| 660 | 660 | $redirection = Services::redirection(); |
| 661 | 661 | |
| 662 | - if (! empty($uri)) { |
|
| 662 | + if (!empty($uri)) { |
|
| 663 | 663 | return $redirection->route($uri); |
| 664 | 664 | } |
| 665 | 665 | |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | } |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | -if (! function_exists('back')) { |
|
| 670 | +if (!function_exists('back')) { |
|
| 671 | 671 | /** |
| 672 | 672 | * Retourne a la page precedente |
| 673 | 673 | * |
@@ -679,7 +679,7 @@ discard block |
||
| 679 | 679 | } |
| 680 | 680 | } |
| 681 | 681 | |
| 682 | -if (! function_exists('link_to')) { |
|
| 682 | +if (!function_exists('link_to')) { |
|
| 683 | 683 | /** |
| 684 | 684 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
| 685 | 685 | * tentera de créer l'URL relative à la route correspondante. |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | } |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | -if (! function_exists('clean_path')) { |
|
| 702 | +if (!function_exists('clean_path')) { |
|
| 703 | 703 | /** |
| 704 | 704 | * Une méthode pratique pour nettoyer les chemins pour |
| 705 | 705 | * une sortie plus belle. Utile pour les exceptions |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | } |
| 732 | 732 | } |
| 733 | 733 | |
| 734 | -if (! function_exists('old')) { |
|
| 734 | +if (!function_exists('old')) { |
|
| 735 | 735 | /** |
| 736 | 736 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
| 737 | 737 | * |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | function old(string $key, $default = null, $escape = 'html') |
| 745 | 745 | { |
| 746 | 746 | // Assurez-vous de charger la session |
| 747 | - if (session_status() === PHP_SESSION_NONE && ! on_test()) { |
|
| 747 | + if (session_status() === PHP_SESSION_NONE && !on_test()) { |
|
| 748 | 748 | session(); // @codeCoverageIgnore |
| 749 | 749 | } |
| 750 | 750 | |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | |
| 760 | 760 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
| 761 | 761 | |
| 762 | -if (! function_exists('deprecationWarning')) { |
|
| 762 | +if (!function_exists('deprecationWarning')) { |
|
| 763 | 763 | /** |
| 764 | 764 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
| 765 | 765 | * |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | } |
| 776 | 776 | } |
| 777 | 777 | |
| 778 | -if (! function_exists('pr')) { |
|
| 778 | +if (!function_exists('pr')) { |
|
| 779 | 779 | /** |
| 780 | 780 | * print_r() convenience function. |
| 781 | 781 | * |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | } |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | -if (! function_exists('pj')) { |
|
| 800 | +if (!function_exists('pj')) { |
|
| 801 | 801 | /** |
| 802 | 802 | * json pretty print convenience function. |
| 803 | 803 | * |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | } |
| 819 | 819 | } |
| 820 | 820 | |
| 821 | -if (! function_exists('trigger_warning')) { |
|
| 821 | +if (!function_exists('trigger_warning')) { |
|
| 822 | 822 | /** |
| 823 | 823 | * Déclenche un E_USER_WARNING. |
| 824 | 824 | */ |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | |
| 831 | 831 | // ================================= FONCTIONS DIVERSES ================================= // |
| 832 | 832 | |
| 833 | -if (! function_exists('force_https')) { |
|
| 833 | +if (!function_exists('force_https')) { |
|
| 834 | 834 | /** |
| 835 | 835 | * Utilisé pour forcer l'accès à une page via HTTPS. |
| 836 | 836 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | |
| 858 | 858 | // Si la session est active, nous devons régénérer |
| 859 | 859 | // l'ID de session pour des raisons de sécurité. |
| 860 | - if (! on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
| 860 | + if (!on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
| 861 | 861 | Services::session()->regenerate(); // @codeCoverageIgnore |
| 862 | 862 | } |
| 863 | 863 | |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | } |
| 874 | 874 | } |
| 875 | 875 | |
| 876 | -if (! function_exists('get_type_name')) { |
|
| 876 | +if (!function_exists('get_type_name')) { |
|
| 877 | 877 | /** |
| 878 | 878 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
| 879 | 879 | * |
@@ -887,7 +887,7 @@ discard block |
||
| 887 | 887 | } |
| 888 | 888 | } |
| 889 | 889 | |
| 890 | -if (! function_exists('ip_address')) { |
|
| 890 | +if (!function_exists('ip_address')) { |
|
| 891 | 891 | /** |
| 892 | 892 | * Renvoie l'adresse IP de l'utilisateur actuel |
| 893 | 893 | */ |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | } |
| 898 | 898 | } |
| 899 | 899 | |
| 900 | -if (! function_exists('is_really_writable')) { |
|
| 900 | +if (!function_exists('is_really_writable')) { |
|
| 901 | 901 | /** |
| 902 | 902 | * Tests d'inscriptibilité des fichiers |
| 903 | 903 | */ |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | } |
| 908 | 908 | } |
| 909 | 909 | |
| 910 | -if (! function_exists('lang')) { |
|
| 910 | +if (!function_exists('lang')) { |
|
| 911 | 911 | /** |
| 912 | 912 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 913 | 913 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | } |
| 919 | 919 | } |
| 920 | 920 | |
| 921 | -if (! function_exists('__')) { |
|
| 921 | +if (!function_exists('__')) { |
|
| 922 | 922 | /** |
| 923 | 923 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 924 | 924 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | } |
| 932 | 932 | } |
| 933 | 933 | |
| 934 | -if (! function_exists('namespace_split')) { |
|
| 934 | +if (!function_exists('namespace_split')) { |
|
| 935 | 935 | /** |
| 936 | 936 | * Séparez l'espace de noms du nom de classe. |
| 937 | 937 | * |
@@ -952,7 +952,7 @@ discard block |
||
| 952 | 952 | } |
| 953 | 953 | } |
| 954 | 954 | |
| 955 | -if (! function_exists('view_exist')) { |
|
| 955 | +if (!function_exists('view_exist')) { |
|
| 956 | 956 | /** |
| 957 | 957 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
| 958 | 958 | */ |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | } |
| 963 | 963 | } |
| 964 | 964 | |
| 965 | -if (! function_exists('view')) { |
|
| 965 | +if (!function_exists('view')) { |
|
| 966 | 966 | /** |
| 967 | 967 | * Saisit la classe compatible avec le RendererInterface et lui demande d'effectuer le rendu de la vue spécifiée. |
| 968 | 968 | * Fournit simplement une méthode de commodité qui peut être utilisée dans les contrôleurs, les bibliothèques et les routes sous forme de closure. |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | } |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | -if (! function_exists('component')) { |
|
| 980 | +if (!function_exists('component')) { |
|
| 981 | 981 | /** |
| 982 | 982 | * Les composants de vue sont utilisées dans les vues pour insérer des morceaux de HTML qui sont gérés par d'autres classes. |
| 983 | 983 | * |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | } |
| 995 | 995 | |
| 996 | -if (! function_exists('flash')) { |
|
| 996 | +if (!function_exists('flash')) { |
|
| 997 | 997 | /** |
| 998 | 998 | * Fournisseur d'acces rapide a la classe PHP Flash |
| 999 | 999 | * |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | }*/ |
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | -if (! function_exists('geo_ip')) { |
|
| 1028 | +if (!function_exists('geo_ip')) { |
|
| 1029 | 1029 | /** |
| 1030 | 1030 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
| 1031 | 1031 | */ |
@@ -1035,7 +1035,7 @@ discard block |
||
| 1035 | 1035 | } |
| 1036 | 1036 | } |
| 1037 | 1037 | |
| 1038 | -if (! function_exists('to_stream')) { |
|
| 1038 | +if (!function_exists('to_stream')) { |
|
| 1039 | 1039 | /** |
| 1040 | 1040 | * Créez un nouveau flux basé sur le type d'entrée. |
| 1041 | 1041 | * |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | } |
| 1057 | 1057 | } |
| 1058 | 1058 | |
| 1059 | -if (! function_exists('value')) { |
|
| 1059 | +if (!function_exists('value')) { |
|
| 1060 | 1060 | /** |
| 1061 | 1061 | * Renvoie la valeur par défaut de la valeur donnée. |
| 1062 | 1062 | */ |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | } |
| 1067 | 1067 | } |
| 1068 | 1068 | |
| 1069 | -if (! function_exists('collect')) { |
|
| 1069 | +if (!function_exists('collect')) { |
|
| 1070 | 1070 | /** |
| 1071 | 1071 | * Créez une collection à partir de la valeur donnée. |
| 1072 | 1072 | */ |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | } |
| 1077 | 1077 | } |
| 1078 | 1078 | |
| 1079 | -if (! function_exists('with')) { |
|
| 1079 | +if (!function_exists('with')) { |
|
| 1080 | 1080 | /** |
| 1081 | 1081 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
| 1082 | 1082 | * |
@@ -1088,7 +1088,7 @@ discard block |
||
| 1088 | 1088 | } |
| 1089 | 1089 | } |
| 1090 | 1090 | |
| 1091 | -if (! function_exists('tap')) { |
|
| 1091 | +if (!function_exists('tap')) { |
|
| 1092 | 1092 | /** |
| 1093 | 1093 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
| 1094 | 1094 | */ |
@@ -1098,7 +1098,7 @@ discard block |
||
| 1098 | 1098 | } |
| 1099 | 1099 | } |
| 1100 | 1100 | |
| 1101 | -if (! function_exists('last')) { |
|
| 1101 | +if (!function_exists('last')) { |
|
| 1102 | 1102 | /** |
| 1103 | 1103 | * Recupere le dernier element d'un tableau |
| 1104 | 1104 | * |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | } |
| 1115 | 1115 | } |
| 1116 | 1116 | |
| 1117 | -if (! function_exists('invade')) { |
|
| 1117 | +if (!function_exists('invade')) { |
|
| 1118 | 1118 | /** |
| 1119 | 1119 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
| 1120 | 1120 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $instance->initialize(Services::request(), Services::response(), Services::logger()); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! method_exists($instance, $method)) { |
|
| 84 | + if (!method_exists($instance, $method)) { |
|
| 85 | 85 | throw ViewException::invalidComponentMethod($class, $method); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $library = str_replace('::', ':', $library); |
| 148 | 148 | |
| 149 | 149 | // Les composants contrôlées peuvent être appelées avec le seul nom de la classe, c'est pourquoi il faut ajouter une méthode par défaut |
| 150 | - if (! str_contains($library, ':')) { |
|
| 150 | + if (!str_contains($library, ':')) { |
|
| 151 | 151 | $library .= ':render'; |
| 152 | 152 | } |
| 153 | 153 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if (! is_object($object)) { |
|
| 180 | + if (!is_object($object)) { |
|
| 181 | 181 | throw ViewException::invalidComponentClass($class); |
| 182 | 182 | } |
| 183 | 183 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | $output = $instance->{$method}(); |
| 274 | 274 | } elseif (($paramCount === 1) |
| 275 | - && ((! array_key_exists($refParams[0]->name, $params)) |
|
| 275 | + && ((!array_key_exists($refParams[0]->name, $params)) |
|
| 276 | 276 | || (array_key_exists($refParams[0]->name, $params) |
| 277 | 277 | && count($params) !== 1)) |
| 278 | 278 | ) { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | foreach (array_keys($params) as $key) { |
| 292 | - if (! isset($methodParams[$key])) { |
|
| 292 | + if (!isset($methodParams[$key])) { |
|
| 293 | 293 | throw ViewException::invalidComponentParameter($key); |
| 294 | 294 | } |
| 295 | 295 | } |