@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public static function setUpBeforeClass(): void |
| 26 | 26 | { |
| 27 | - if (! is_dir($dirname = pathinfo(static::$ou, PATHINFO_DIRNAME))) { |
|
| 27 | + if (!is_dir($dirname = pathinfo(static::$ou, PATHINFO_DIRNAME))) { |
|
| 28 | 28 | mkdir($dirname, 0o777, true); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 'Sodium' => extension_loaded('sodium') && version_compare(SODIUM_LIBRARY_VERSION, '1.0.14', '>='), |
| 83 | 83 | ]; |
| 84 | 84 | |
| 85 | - if (! in_array($this->driver, $this->drivers, true) || (array_key_exists($this->driver, $this->handlers) && ! $this->handlers[$this->driver])) { |
|
| 85 | + if (!in_array($this->driver, $this->drivers, true) || (array_key_exists($this->driver, $this->handlers) && !$this->handlers[$this->driver])) { |
|
| 86 | 86 | throw EncryptionException::noHandlerAvailable($this->driver); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | throw EncryptionException::noDriverRequested(); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (! in_array($this->driver, $this->drivers, true)) { |
|
| 123 | + if (!in_array($this->driver, $this->drivers, true)) { |
|
| 124 | 124 | throw EncryptionException::unKnownHandler($this->driver); |
| 125 | 125 | } |
| 126 | 126 | |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | $data = self::substr($data, $hmacLength); |
| 126 | 126 | $hmacCalc = \hash_hmac($this->digest, $data, $authKey, $this->rawData); |
| 127 | 127 | |
| 128 | - if (! hash_equals($hmacKey, $hmacCalc)) { |
|
| 128 | + if (!hash_equals($hmacKey, $hmacCalc)) { |
|
| 129 | 129 | throw EncryptionException::authenticationFailed(); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | // ================================= FONCTIONS UTIILITAIRES ESSENTIELLES ================================= // |
| 27 | 27 | |
| 28 | -if (! function_exists('env')) { |
|
| 28 | +if (!function_exists('env')) { |
|
| 29 | 29 | /** |
| 30 | 30 | * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation |
| 31 | 31 | * pour les variables d'environnement non prises en charge ou incohérentes |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | -if (! function_exists('helper')) { |
|
| 44 | +if (!function_exists('helper')) { |
|
| 45 | 45 | /** |
| 46 | 46 | * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms, |
| 47 | 47 | * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms. |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | -if (! function_exists('model')) { |
|
| 60 | +if (!function_exists('model')) { |
|
| 61 | 61 | /** |
| 62 | 62 | * Simple maniere d'obtenir un modele. |
| 63 | 63 | * |
@@ -67,13 +67,13 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return T |
| 69 | 69 | */ |
| 70 | - function model(array|string $name, ?ConnectionInterface &$conn = null) |
|
| 70 | + function model(array|string $name, ?ConnectionInterface&$conn = null) |
|
| 71 | 71 | { |
| 72 | 72 | return Load::model($name, $conn); |
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | -if (! function_exists('service')) { |
|
| 76 | +if (!function_exists('service')) { |
|
| 77 | 77 | /** |
| 78 | 78 | * Permet un accès plus propre au fichier de configuration des services. |
| 79 | 79 | * Renvoie toujours une instance SHARED de la classe, donc |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | -if (! function_exists('single_service')) { |
|
| 99 | +if (!function_exists('single_service')) { |
|
| 100 | 100 | /** |
| 101 | 101 | * Autoriser l'accès propre à un service. |
| 102 | 102 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | -if (! function_exists('show404')) { |
|
| 113 | +if (!function_exists('show404')) { |
|
| 114 | 114 | /** |
| 115 | 115 | * Afficher une page 404 introuvable dans le navigateur |
| 116 | 116 | */ |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | -if (! function_exists('command')) { |
|
| 123 | +if (!function_exists('command')) { |
|
| 124 | 124 | /** |
| 125 | 125 | * Runs a single command. |
| 126 | 126 | * Input expected in a single string as would be used on the command line itself: |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | -if (! function_exists('config')) { |
|
| 183 | +if (!function_exists('config')) { |
|
| 184 | 184 | /** |
| 185 | 185 | * GET/SET App config |
| 186 | 186 | * |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | -if (! function_exists('logger')) { |
|
| 211 | +if (!function_exists('logger')) { |
|
| 212 | 212 | /** |
| 213 | 213 | * Une méthode de commodité pour les événements de journalisation via le système Log. |
| 214 | 214 | * |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | -if (! function_exists('cache')) { |
|
| 241 | +if (!function_exists('cache')) { |
|
| 242 | 242 | /** |
| 243 | 243 | * Une méthode pratique qui donne accès au cache |
| 244 | 244 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | -if (! function_exists('session')) { |
|
| 271 | +if (!function_exists('session')) { |
|
| 272 | 272 | /** |
| 273 | 273 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
| 274 | 274 | * |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
| 295 | 295 | |
| 296 | -if (! function_exists('esc')) { |
|
| 296 | +if (!function_exists('esc')) { |
|
| 297 | 297 | /** |
| 298 | 298 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
| 299 | 299 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | -if (! function_exists('h')) { |
|
| 323 | +if (!function_exists('h')) { |
|
| 324 | 324 | /** |
| 325 | 325 | * Méthode pratique pour htmlspecialchars. |
| 326 | 326 | * |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | -if (! function_exists('purify')) { |
|
| 342 | +if (!function_exists('purify')) { |
|
| 343 | 343 | /** |
| 344 | 344 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
| 345 | 345 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | -if (! function_exists('remove_invisible_characters')) { |
|
| 358 | +if (!function_exists('remove_invisible_characters')) { |
|
| 359 | 359 | /** |
| 360 | 360 | * Supprimer les caractères invisibles |
| 361 | 361 | * |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | -if (! function_exists('stringify_attributes')) { |
|
| 371 | +if (!function_exists('stringify_attributes')) { |
|
| 372 | 372 | /** |
| 373 | 373 | * Chaîner les attributs à utiliser dans les balises HTML. |
| 374 | 374 | * |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
| 384 | 384 | |
| 385 | -if (! function_exists('environment')) { |
|
| 385 | +if (!function_exists('environment')) { |
|
| 386 | 386 | /** |
| 387 | 387 | * Renvoi l'environnement d'execution actuel ou determine si on est dans un environnement specifie |
| 388 | 388 | * |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | -if (! function_exists('on_dev')) { |
|
| 423 | +if (!function_exists('on_dev')) { |
|
| 424 | 424 | /** |
| 425 | 425 | * Testez pour voir si nous sommes dans un environnement de développement. |
| 426 | 426 | */ |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | } |
| 435 | 435 | } |
| 436 | 436 | |
| 437 | -if (! function_exists('on_prod')) { |
|
| 437 | +if (!function_exists('on_prod')) { |
|
| 438 | 438 | /** |
| 439 | 439 | * Testez pour voir si nous sommes dans un environnement de production. |
| 440 | 440 | */ |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | -if (! function_exists('on_test')) { |
|
| 451 | +if (!function_exists('on_test')) { |
|
| 452 | 452 | /** |
| 453 | 453 | * Testez pour voir si nous sommes dans un environnement de test |
| 454 | 454 | */ |
@@ -458,7 +458,7 @@ discard block |
||
| 458 | 458 | } |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | -if (! function_exists('is_cli')) { |
|
| 461 | +if (!function_exists('is_cli')) { |
|
| 462 | 462 | /** |
| 463 | 463 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
| 464 | 464 | */ |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | } |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | -if (! function_exists('is_php')) { |
|
| 471 | +if (!function_exists('is_php')) { |
|
| 472 | 472 | /** |
| 473 | 473 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
| 474 | 474 | */ |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | } |
| 479 | 479 | } |
| 480 | 480 | |
| 481 | -if (! function_exists('is_windows')) { |
|
| 481 | +if (!function_exists('is_windows')) { |
|
| 482 | 482 | /** |
| 483 | 483 | * Déterminez si l'environnement actuel est basé sur Windows. |
| 484 | 484 | */ |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | -if (! function_exists('is_https')) { |
|
| 491 | +if (!function_exists('is_https')) { |
|
| 492 | 492 | /** |
| 493 | 493 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
| 494 | 494 | */ |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | } |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | -if (! function_exists('is_localfile')) { |
|
| 501 | +if (!function_exists('is_localfile')) { |
|
| 502 | 502 | /** |
| 503 | 503 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
| 504 | 504 | */ |
@@ -508,11 +508,11 @@ discard block |
||
| 508 | 508 | return true; |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | - return ! preg_match('#^(https?://)#i', $name); |
|
| 511 | + return !preg_match('#^(https?://)#i', $name); |
|
| 512 | 512 | } |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | -if (! function_exists('is_online')) { |
|
| 515 | +if (!function_exists('is_online')) { |
|
| 516 | 516 | /** |
| 517 | 517 | * Tester si l'application s'exécute en local ou en ligne. |
| 518 | 518 | */ |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | } |
| 523 | 523 | } |
| 524 | 524 | |
| 525 | -if (! function_exists('is_connected')) { |
|
| 525 | +if (!function_exists('is_connected')) { |
|
| 526 | 526 | /** |
| 527 | 527 | * Verifie si l'utilisateur a une connexion internet active. |
| 528 | 528 | */ |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | } |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | -if (! function_exists('is_ajax_request')) { |
|
| 535 | +if (!function_exists('is_ajax_request')) { |
|
| 536 | 536 | /** |
| 537 | 537 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
| 538 | 538 | */ |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | |
| 545 | -if (! function_exists('redirection')) { |
|
| 545 | +if (!function_exists('redirection')) { |
|
| 546 | 546 | /** |
| 547 | 547 | * Redirige l'utilisateur |
| 548 | 548 | */ |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | } |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | -if (! function_exists('redirect')) { |
|
| 559 | +if (!function_exists('redirect')) { |
|
| 560 | 560 | /** |
| 561 | 561 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
| 562 | 562 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | { |
| 571 | 571 | $redirection = Services::redirection(); |
| 572 | 572 | |
| 573 | - if (! empty($uri)) { |
|
| 573 | + if (!empty($uri)) { |
|
| 574 | 574 | return $redirection->route($uri); |
| 575 | 575 | } |
| 576 | 576 | |
@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | } |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | -if (! function_exists('back')) { |
|
| 581 | +if (!function_exists('back')) { |
|
| 582 | 582 | /** |
| 583 | 583 | * Retourne a la page precedente |
| 584 | 584 | * |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | } |
| 591 | 591 | } |
| 592 | 592 | |
| 593 | -if (! function_exists('link_to')) { |
|
| 593 | +if (!function_exists('link_to')) { |
|
| 594 | 594 | /** |
| 595 | 595 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
| 596 | 596 | * tentera de créer l'URL relative à la route correspondante. |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | 612 | |
| 613 | -if (! function_exists('clean_path')) { |
|
| 613 | +if (!function_exists('clean_path')) { |
|
| 614 | 614 | /** |
| 615 | 615 | * Une méthode pratique pour nettoyer les chemins pour |
| 616 | 616 | * une sortie plus belle. Utile pour les exceptions |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | -if (! function_exists('old')) { |
|
| 645 | +if (!function_exists('old')) { |
|
| 646 | 646 | /** |
| 647 | 647 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
| 648 | 648 | * |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | function old(string $key, $default = null, $escape = 'html') |
| 656 | 656 | { |
| 657 | 657 | // Assurez-vous de charger la session |
| 658 | - if (session_status() === PHP_SESSION_NONE && ! on_test()) { |
|
| 658 | + if (session_status() === PHP_SESSION_NONE && !on_test()) { |
|
| 659 | 659 | session(); // @codeCoverageIgnore |
| 660 | 660 | } |
| 661 | 661 | |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | |
| 671 | 671 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
| 672 | 672 | |
| 673 | -if (! function_exists('deprecationWarning')) { |
|
| 673 | +if (!function_exists('deprecationWarning')) { |
|
| 674 | 674 | /** |
| 675 | 675 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
| 676 | 676 | * |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | } |
| 687 | 687 | } |
| 688 | 688 | |
| 689 | -if (! function_exists('pr')) { |
|
| 689 | +if (!function_exists('pr')) { |
|
| 690 | 690 | /** |
| 691 | 691 | * print_r() convenience function. |
| 692 | 692 | * |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | } |
| 709 | 709 | } |
| 710 | 710 | |
| 711 | -if (! function_exists('pj')) { |
|
| 711 | +if (!function_exists('pj')) { |
|
| 712 | 712 | /** |
| 713 | 713 | * json pretty print convenience function. |
| 714 | 714 | * |
@@ -729,7 +729,7 @@ discard block |
||
| 729 | 729 | } |
| 730 | 730 | } |
| 731 | 731 | |
| 732 | -if (! function_exists('trigger_warning')) { |
|
| 732 | +if (!function_exists('trigger_warning')) { |
|
| 733 | 733 | /** |
| 734 | 734 | * Déclenche un E_USER_WARNING. |
| 735 | 735 | */ |
@@ -741,7 +741,7 @@ discard block |
||
| 741 | 741 | |
| 742 | 742 | // ================================= FONCTIONS DIVERSES ================================= // |
| 743 | 743 | |
| 744 | -if (! function_exists('force_https')) { |
|
| 744 | +if (!function_exists('force_https')) { |
|
| 745 | 745 | /** |
| 746 | 746 | * Utilisé pour forcer l'accès à une page via HTTPS. |
| 747 | 747 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -799,7 +799,7 @@ discard block |
||
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | -if (! function_exists('get_type_name')) { |
|
| 802 | +if (!function_exists('get_type_name')) { |
|
| 803 | 803 | /** |
| 804 | 804 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
| 805 | 805 | * |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | } |
| 814 | 814 | } |
| 815 | 815 | |
| 816 | -if (! function_exists('ip_address')) { |
|
| 816 | +if (!function_exists('ip_address')) { |
|
| 817 | 817 | /** |
| 818 | 818 | * Renvoie l'adresse IP de l'utilisateur actuel |
| 819 | 819 | */ |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | } |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | -if (! function_exists('is_really_writable')) { |
|
| 826 | +if (!function_exists('is_really_writable')) { |
|
| 827 | 827 | /** |
| 828 | 828 | * Tests d'inscriptibilité des fichiers |
| 829 | 829 | */ |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | } |
| 834 | 834 | } |
| 835 | 835 | |
| 836 | -if (! function_exists('lang')) { |
|
| 836 | +if (!function_exists('lang')) { |
|
| 837 | 837 | /** |
| 838 | 838 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 839 | 839 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -844,7 +844,7 @@ discard block |
||
| 844 | 844 | } |
| 845 | 845 | } |
| 846 | 846 | |
| 847 | -if (! function_exists('__')) { |
|
| 847 | +if (!function_exists('__')) { |
|
| 848 | 848 | /** |
| 849 | 849 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 850 | 850 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | } |
| 858 | 858 | } |
| 859 | 859 | |
| 860 | -if (! function_exists('namespace_split')) { |
|
| 860 | +if (!function_exists('namespace_split')) { |
|
| 861 | 861 | /** |
| 862 | 862 | * Séparez l'espace de noms du nom de classe. |
| 863 | 863 | * |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | } |
| 879 | 879 | } |
| 880 | 880 | |
| 881 | -if (! function_exists('view_exist')) { |
|
| 881 | +if (!function_exists('view_exist')) { |
|
| 882 | 882 | /** |
| 883 | 883 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
| 884 | 884 | */ |
@@ -892,7 +892,7 @@ discard block |
||
| 892 | 892 | } |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | -if (! function_exists('view')) { |
|
| 895 | +if (!function_exists('view')) { |
|
| 896 | 896 | /** |
| 897 | 897 | * Charge une vue |
| 898 | 898 | * |
@@ -908,7 +908,7 @@ discard block |
||
| 908 | 908 | } |
| 909 | 909 | } |
| 910 | 910 | |
| 911 | -if (! function_exists('flash')) { |
|
| 911 | +if (!function_exists('flash')) { |
|
| 912 | 912 | /** |
| 913 | 913 | * Fournisseur d'acces rapide a la classe PHP Flash |
| 914 | 914 | * |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | }*/ |
| 941 | 941 | } |
| 942 | 942 | |
| 943 | -if (! function_exists('geo_ip')) { |
|
| 943 | +if (!function_exists('geo_ip')) { |
|
| 944 | 944 | /** |
| 945 | 945 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
| 946 | 946 | */ |
@@ -950,7 +950,7 @@ discard block |
||
| 950 | 950 | } |
| 951 | 951 | } |
| 952 | 952 | |
| 953 | -if (! function_exists('to_stream')) { |
|
| 953 | +if (!function_exists('to_stream')) { |
|
| 954 | 954 | /** |
| 955 | 955 | * Créez un nouveau flux basé sur le type d'entrée. |
| 956 | 956 | * |
@@ -971,7 +971,7 @@ discard block |
||
| 971 | 971 | } |
| 972 | 972 | } |
| 973 | 973 | |
| 974 | -if (! function_exists('value')) { |
|
| 974 | +if (!function_exists('value')) { |
|
| 975 | 975 | /** |
| 976 | 976 | * Renvoie la valeur par défaut de la valeur donnée. |
| 977 | 977 | */ |
@@ -981,7 +981,7 @@ discard block |
||
| 981 | 981 | } |
| 982 | 982 | } |
| 983 | 983 | |
| 984 | -if (! function_exists('collect')) { |
|
| 984 | +if (!function_exists('collect')) { |
|
| 985 | 985 | /** |
| 986 | 986 | * Créez une collection à partir de la valeur donnée. |
| 987 | 987 | */ |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | } |
| 992 | 992 | } |
| 993 | 993 | |
| 994 | -if (! function_exists('with')) { |
|
| 994 | +if (!function_exists('with')) { |
|
| 995 | 995 | /** |
| 996 | 996 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
| 997 | 997 | * |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | } |
| 1004 | 1004 | } |
| 1005 | 1005 | |
| 1006 | -if (! function_exists('tap')) { |
|
| 1006 | +if (!function_exists('tap')) { |
|
| 1007 | 1007 | /** |
| 1008 | 1008 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
| 1009 | 1009 | */ |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | } |
| 1014 | 1014 | } |
| 1015 | 1015 | |
| 1016 | -if (! function_exists('last')) { |
|
| 1016 | +if (!function_exists('last')) { |
|
| 1017 | 1017 | /** |
| 1018 | 1018 | * Recupere le dernier element d'un tableau |
| 1019 | 1019 | */ |
@@ -1023,7 +1023,7 @@ discard block |
||
| 1023 | 1023 | } |
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | -if (! function_exists('invade')) { |
|
| 1026 | +if (!function_exists('invade')) { |
|
| 1027 | 1027 | /** |
| 1028 | 1028 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
| 1029 | 1029 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | foreach ($options as $key => $value) { |
| 159 | 159 | $key = preg_replace('/^\-\-/', '', $key); |
| 160 | - if (! isset($options[$key])) { |
|
| 160 | + if (!isset($options[$key])) { |
|
| 161 | 161 | $options[$key] = $value; |
| 162 | 162 | } |
| 163 | 163 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | foreach ($files as $file) { |
| 198 | 198 | $className = $locator->findQualifiedNameFromPath($file); |
| 199 | 199 | |
| 200 | - if ($className === false || ! class_exists($className)) { |
|
| 200 | + if ($className === false || !class_exists($className)) { |
|
| 201 | 201 | continue; |
| 202 | 202 | } |
| 203 | 203 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $class = new ReflectionClass($className); |
| 224 | 224 | $logger = $logger ?: Services::logger(); |
| 225 | 225 | |
| 226 | - if (! $class->isInstantiable() || ! $class->isSubclassOf(Command::class)) { |
|
| 226 | + if (!$class->isInstantiable() || !$class->isSubclassOf(Command::class)) { |
|
| 227 | 227 | throw CLIException::invalidCommand($className); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -250,13 +250,13 @@ discard block |
||
| 250 | 250 | $value = (array) $value; |
| 251 | 251 | |
| 252 | 252 | $description = $value[0]; |
| 253 | - if (! is_string($description)) { |
|
| 253 | + if (!is_string($description)) { |
|
| 254 | 254 | continue; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | $default = $value[1] ?? null; |
| 258 | 258 | $filter = $value[2] ?? null; |
| 259 | - if ($filter !== null && ! is_callable($filter)) { |
|
| 259 | + if ($filter !== null && !is_callable($filter)) { |
|
| 260 | 260 | $filter = null; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $value = (array) $value; |
| 269 | 269 | |
| 270 | 270 | $description = $value[0]; |
| 271 | - if (! is_string($description)) { |
|
| 271 | + if (!is_string($description)) { |
|
| 272 | 272 | continue; |
| 273 | 273 | } |
| 274 | 274 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | $console = $this; |
| 281 | - $action = function (?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
| 281 | + $action = function(?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
| 282 | 282 | foreach ($instance->required as $package) { |
| 283 | 283 | $package = explode(':', $package); |
| 284 | 284 | $version = $package[1] ?? null; |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | /** @var \Ahc\Cli\IO\Interactor $io */ |
| 288 | 288 | $io = $this->io(); |
| 289 | 289 | |
| 290 | - if (! InstalledVersions::isInstalled($package)) { |
|
| 290 | + if (!InstalledVersions::isInstalled($package)) { |
|
| 291 | 291 | $io->info('Cette commande nécessite le package "' . $package . '" mais vous ne l\'avez pas', true); |
| 292 | - if (! $io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
| 292 | + if (!$io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
| 293 | 293 | return; |
| 294 | 294 | } |
| 295 | 295 | |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | $suppress = $suppress ?: $console->suppress; |
| 308 | - if (! $suppress) { |
|
| 308 | + if (!$suppress) { |
|
| 309 | 309 | $console->start($instance->service); |
| 310 | 310 | } |
| 311 | 311 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | $result = $instance->setOptions($options)->setArguments($arguments)->execute($parameters); |
| 322 | 322 | |
| 323 | - if (! $suppress) { |
|
| 323 | + if (!$suppress) { |
|
| 324 | 324 | $console->end(); |
| 325 | 325 | } |
| 326 | 326 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | |
| 336 | 336 | private function registerException(Logger $logger) |
| 337 | 337 | { |
| 338 | - $this->onException(static function (Throwable $e, int $exitCode) use ($logger) { |
|
| 338 | + $this->onException(static function(Throwable $e, int $exitCode) use ($logger) { |
|
| 339 | 339 | $logger->error((string) $e, ['exitCode' => $exitCode, 'klinge' => true]); |
| 340 | 340 | |
| 341 | 341 | throw new CLIException($e->getMessage(), $exitCode, $e); |