@@ -65,7 +65,7 @@ |
||
| 65 | 65 | */ |
| 66 | 66 | public function add($middlewares, array $options = []): self |
| 67 | 67 | { |
| 68 | - if (! is_array($middlewares)) { |
|
| 68 | + if (!is_array($middlewares)) { |
|
| 69 | 69 | $middlewares = [$middlewares]; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -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 | |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | require_once $routes_file; |
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | - if (empty($routes) || ! ($routes instanceof RouteCollection)) { |
|
| 281 | + if (empty($routes) || !($routes instanceof RouteCollection)) { |
|
| 282 | 282 | $routes = Services::routes(); |
| 283 | 283 | } |
| 284 | 284 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | */ |
| 307 | 307 | $this->gatherOutput($this->middleware->handle($this->request)); |
| 308 | 308 | |
| 309 | - if (! $returnResponse) { |
|
| 309 | + if (!$returnResponse) { |
|
| 310 | 310 | $this->sendResponse(); |
| 311 | 311 | } |
| 312 | 312 | |
@@ -354,14 +354,14 @@ discard block |
||
| 354 | 354 | return; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | - if (is_cli() && ! on_test()) { |
|
| 357 | + if (is_cli() && !on_test()) { |
|
| 358 | 358 | // @codeCoverageIgnoreStart |
| 359 | 359 | // $this->request = Services::clirequest($this->config); |
| 360 | 360 | // @codeCoverageIgnoreEnd |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; |
| 364 | - if (! is_numeric($version)) { |
|
| 364 | + if (!is_numeric($version)) { |
|
| 365 | 365 | $version = substr($version, strpos($version, '/') + 1); |
| 366 | 366 | } |
| 367 | 367 | |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | // Supposons le succès jusqu'à preuve du contraire. |
| 381 | 381 | $this->response = Services::response()->withStatus(200); |
| 382 | 382 | |
| 383 | - if (! is_cli() || on_test()) { |
|
| 383 | + if (!is_cli() || on_test()) { |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion()); |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | { |
| 417 | 417 | if ($cachedResponse = Services::cache()->read($this->generateCacheName())) { |
| 418 | 418 | $cachedResponse = unserialize($cachedResponse); |
| 419 | - if (! is_array($cachedResponse) || ! isset($cachedResponse['output']) || ! isset($cachedResponse['headers'])) { |
|
| 419 | + if (!is_array($cachedResponse) || !isset($cachedResponse['output']) || !isset($cachedResponse['headers'])) { |
|
| 420 | 420 | throw new FrameworkException('Error unserializing page cache'); |
| 421 | 421 | } |
| 422 | 422 | |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | */ |
| 546 | 546 | protected function determinePath(): string |
| 547 | 547 | { |
| 548 | - if (! empty($this->path)) { |
|
| 548 | + if (!empty($this->path)) { |
|
| 549 | 549 | return $this->path; |
| 550 | 550 | } |
| 551 | 551 | |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | // Essayez de charger automatiquement la classe |
| 602 | - if (! class_exists($this->controller, true) || $this->method[0] === '_') { |
|
| 602 | + if (!class_exists($this->controller, true) || $this->method[0] === '_') { |
|
| 603 | 603 | throw PageNotFoundException::controllerNotFound($this->controller, $this->method); |
| 604 | 604 | } |
| 605 | 605 | |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | // Affiche l'erreur 404 |
| 688 | 688 | $this->response = $this->response->withStatus($e->getCode()); |
| 689 | 689 | |
| 690 | - if (! on_test()) { |
|
| 690 | + if (!on_test()) { |
|
| 691 | 691 | // @codeCoverageIgnoreStart |
| 692 | 692 | if (ob_get_level() > 0) { |
| 693 | 693 | ob_end_flush(); |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | ob_end_flush(); // @codeCoverageIgnore |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | - throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 702 | + throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : ''); |
|
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | /** |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | public function storePreviousURL($uri) |
| 755 | 755 | { |
| 756 | 756 | // Ignorer les requêtes CLI |
| 757 | - if (is_cli() && ! on_test()) { |
|
| 757 | + if (is_cli() && !on_test()) { |
|
| 758 | 758 | return; // @codeCoverageIgnore |
| 759 | 759 | } |
| 760 | 760 | |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | ]); |
| 859 | 859 | |
| 860 | 860 | $middlewaresFile = CONFIG_PATH . 'middlewares.php'; |
| 861 | - if (file_exists($middlewaresFile) && ! in_array($middlewaresFile, get_included_files(), true)) { |
|
| 861 | + if (file_exists($middlewaresFile) && !in_array($middlewaresFile, get_included_files(), true)) { |
|
| 862 | 862 | $middleware = require $middlewaresFile; |
| 863 | 863 | if (is_callable($middleware)) { |
| 864 | 864 | $middleware($this->middleware, $this->request); |
@@ -874,11 +874,11 @@ discard block |
||
| 874 | 874 | */ |
| 875 | 875 | private function spoofRequestMethod(): callable |
| 876 | 876 | { |
| 877 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 877 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
| 878 | 878 | $post = $request->getParsedBody(); |
| 879 | 879 | |
| 880 | 880 | // Ne fonctionne qu'avec les formulaires POST |
| 881 | - if (strtoupper($request->getMethod()) === 'POST' && ! empty($post['_method'])) { |
|
| 881 | + if (strtoupper($request->getMethod()) === 'POST' && !empty($post['_method'])) { |
|
| 882 | 882 | // Accepte seulement PUT, PATCH, DELETE |
| 883 | 883 | if (in_array(strtoupper($post['_method']), ['PUT', 'PATCH', 'DELETE'], true)) { |
| 884 | 884 | $request = $request->withMethod($post['_method']); |
@@ -893,15 +893,15 @@ discard block |
||
| 893 | 893 | { |
| 894 | 894 | $_this = $this; |
| 895 | 895 | |
| 896 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) use($_this): ResponseInterface { |
|
| 896 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) use($_this): ResponseInterface { |
|
| 897 | 897 | try { |
| 898 | 898 | $returned = $_this->startController($request, $response); |
| 899 | 899 | |
| 900 | 900 | // Closure controller has run in startController(). |
| 901 | - if (! is_callable($_this->controller)) { |
|
| 901 | + if (!is_callable($_this->controller)) { |
|
| 902 | 902 | $controller = $_this->createController($request, $response); |
| 903 | 903 | |
| 904 | - if (! method_exists($controller, '_remap') && ! is_callable([$controller, $_this->method], false)) { |
|
| 904 | + if (!method_exists($controller, '_remap') && !is_callable([$controller, $_this->method], false)) { |
|
| 905 | 905 | throw PageNotFoundException::methodNotFound($_this->method); |
| 906 | 906 | } |
| 907 | 907 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | // ================================= FONCTIONS D'ACCESSIBILITE ================================= // |
| 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. |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | -if (! function_exists('model')) { |
|
| 62 | +if (!function_exists('model')) { |
|
| 63 | 63 | /** |
| 64 | 64 | * Simple maniere d'obtenir un modele. |
| 65 | 65 | * |
@@ -69,13 +69,13 @@ discard block |
||
| 69 | 69 | * |
| 70 | 70 | * @return T |
| 71 | 71 | */ |
| 72 | - function model(string|array $name, ?ConnectionInterface &$conn = null) |
|
| 72 | + function model(string|array $name, ?ConnectionInterface&$conn = null) |
|
| 73 | 73 | { |
| 74 | 74 | return Load::model($name, $conn); |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | -if (! function_exists('service')) { |
|
| 78 | +if (!function_exists('service')) { |
|
| 79 | 79 | /** |
| 80 | 80 | * Permet un accès plus propre au fichier de configuration des services. |
| 81 | 81 | * Renvoie toujours une instance SHARED de la classe, donc |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | -if (! function_exists('single_service')) { |
|
| 95 | +if (!function_exists('single_service')) { |
|
| 96 | 96 | /** |
| 97 | 97 | * Autoriser l'accès propre à un service. |
| 98 | 98 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | -if (! function_exists('show404')) { |
|
| 109 | +if (!function_exists('show404')) { |
|
| 110 | 110 | /** |
| 111 | 111 | * Afficher une page 404 introuvable dans le navigateur |
| 112 | 112 | */ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | -if (! function_exists('config')) { |
|
| 119 | +if (!function_exists('config')) { |
|
| 120 | 120 | /** |
| 121 | 121 | * GET/SET App config |
| 122 | 122 | * |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | function config(string $config, $value = null, bool $force_set = false) |
| 128 | 128 | { |
| 129 | - if (! empty($value) || (empty($value) && true === $force_set)) { |
|
| 129 | + if (!empty($value) || (empty($value) && true === $force_set)) { |
|
| 130 | 130 | Config::set($config, $value); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
| 138 | 138 | |
| 139 | -if (! function_exists('esc')) { |
|
| 139 | +if (!function_exists('esc')) { |
|
| 140 | 140 | /** |
| 141 | 141 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
| 142 | 142 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | -if (! function_exists('h')) { |
|
| 166 | +if (!function_exists('h')) { |
|
| 167 | 167 | /** |
| 168 | 168 | * Méthode pratique pour htmlspecialchars. |
| 169 | 169 | * |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | -if (! function_exists('purify')) { |
|
| 185 | +if (!function_exists('purify')) { |
|
| 186 | 186 | /** |
| 187 | 187 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
| 188 | 188 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | -if (! function_exists('remove_invisible_characters')) { |
|
| 203 | +if (!function_exists('remove_invisible_characters')) { |
|
| 204 | 204 | /** |
| 205 | 205 | * Supprimer les caractères invisibles |
| 206 | 206 | * |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | -if (! function_exists('stringify_attributes')) { |
|
| 216 | +if (!function_exists('stringify_attributes')) { |
|
| 217 | 217 | /** |
| 218 | 218 | * Chaîner les attributs à utiliser dans les balises HTML. |
| 219 | 219 | * |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
| 229 | 229 | |
| 230 | -if (! function_exists('on_dev')) { |
|
| 230 | +if (!function_exists('on_dev')) { |
|
| 231 | 231 | /** |
| 232 | 232 | * Testez pour voir si nous sommes dans un environnement de développement. |
| 233 | 233 | */ |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | -if (! function_exists('on_prod')) { |
|
| 246 | +if (!function_exists('on_prod')) { |
|
| 247 | 247 | /** |
| 248 | 248 | * Testez pour voir si nous sommes dans un environnement de production. |
| 249 | 249 | */ |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | -if (! function_exists('on_test')) { |
|
| 262 | +if (!function_exists('on_test')) { |
|
| 263 | 263 | /** |
| 264 | 264 | * Testez pour voir si nous sommes dans un environnement de test |
| 265 | 265 | */ |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | -if (! function_exists('is_cli')) { |
|
| 274 | +if (!function_exists('is_cli')) { |
|
| 275 | 275 | /** |
| 276 | 276 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
| 277 | 277 | */ |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | } |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | -if (! function_exists('is_php')) { |
|
| 284 | +if (!function_exists('is_php')) { |
|
| 285 | 285 | /** |
| 286 | 286 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
| 287 | 287 | */ |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | -if (! function_exists('is_windows')) { |
|
| 294 | +if (!function_exists('is_windows')) { |
|
| 295 | 295 | /** |
| 296 | 296 | * Déterminez si l'environnement actuel est basé sur Windows. |
| 297 | 297 | */ |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | -if (! function_exists('is_https')) { |
|
| 304 | +if (!function_exists('is_https')) { |
|
| 305 | 305 | /** |
| 306 | 306 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
| 307 | 307 | */ |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | } |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | -if (! function_exists('is_localfile')) { |
|
| 314 | +if (!function_exists('is_localfile')) { |
|
| 315 | 315 | /** |
| 316 | 316 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
| 317 | 317 | */ |
@@ -321,11 +321,11 @@ discard block |
||
| 321 | 321 | return true; |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | - return ! preg_match('#^(https?://)#i', $name); |
|
| 324 | + return !preg_match('#^(https?://)#i', $name); |
|
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | -if (! function_exists('is_online')) { |
|
| 328 | +if (!function_exists('is_online')) { |
|
| 329 | 329 | /** |
| 330 | 330 | * Tester si l'application s'exécute en local ou en ligne. |
| 331 | 331 | */ |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | -if (! function_exists('is_connected')) { |
|
| 338 | +if (!function_exists('is_connected')) { |
|
| 339 | 339 | /** |
| 340 | 340 | * Verifie si l'utilisateur a une connexion internet active. |
| 341 | 341 | */ |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | } |
| 346 | 346 | } |
| 347 | 347 | |
| 348 | -if (! function_exists('is_ajax_request')) { |
|
| 348 | +if (!function_exists('is_ajax_request')) { |
|
| 349 | 349 | /** |
| 350 | 350 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
| 351 | 351 | */ |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | -if (! function_exists('redirection')) { |
|
| 358 | +if (!function_exists('redirection')) { |
|
| 359 | 359 | /** |
| 360 | 360 | * Redirige l'utilisateur |
| 361 | 361 | */ |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | } |
| 370 | 370 | } |
| 371 | 371 | |
| 372 | -if (! function_exists('redirect')) { |
|
| 372 | +if (!function_exists('redirect')) { |
|
| 373 | 373 | /** |
| 374 | 374 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
| 375 | 375 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | { |
| 384 | 384 | $redirection = Services::redirection(); |
| 385 | 385 | |
| 386 | - if (! empty($uri)) { |
|
| 386 | + if (!empty($uri)) { |
|
| 387 | 387 | return $redirection->route($uri); |
| 388 | 388 | } |
| 389 | 389 | |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | } |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | -if (! function_exists('link_to')) { |
|
| 394 | +if (!function_exists('link_to')) { |
|
| 395 | 395 | /** |
| 396 | 396 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
| 397 | 397 | * tentera de créer l'URL relative à la route correspondante. |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | } |
| 408 | 408 | } |
| 409 | 409 | |
| 410 | -if (! function_exists('clean_path')) { |
|
| 410 | +if (!function_exists('clean_path')) { |
|
| 411 | 411 | /** |
| 412 | 412 | * Une méthode pratique pour nettoyer les chemins pour |
| 413 | 413 | * une sortie plus belle. Utile pour les exceptions |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | -if (! function_exists('old')) { |
|
| 439 | +if (!function_exists('old')) { |
|
| 440 | 440 | /** |
| 441 | 441 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
| 442 | 442 | * |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | |
| 464 | 464 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
| 465 | 465 | |
| 466 | -if (! function_exists('dd')) { |
|
| 466 | +if (!function_exists('dd')) { |
|
| 467 | 467 | /** |
| 468 | 468 | * Prints a Kint debug report and exits. |
| 469 | 469 | * |
@@ -482,7 +482,7 @@ discard block |
||
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | |
| 485 | -if (! function_exists('dump')) { |
|
| 485 | +if (!function_exists('dump')) { |
|
| 486 | 486 | /** |
| 487 | 487 | * Prints a Kint debug report and exits. |
| 488 | 488 | * |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | } |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | -if (! function_exists('deprecationWarning')) { |
|
| 502 | +if (!function_exists('deprecationWarning')) { |
|
| 503 | 503 | /** |
| 504 | 504 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
| 505 | 505 | * |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | } |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | -if (! function_exists('logger')) { |
|
| 518 | +if (!function_exists('logger')) { |
|
| 519 | 519 | /** |
| 520 | 520 | * A convenience/compatibility method for logging events through |
| 521 | 521 | * the Log system. |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | { |
| 539 | 539 | $logger = Services::logger(); |
| 540 | 540 | |
| 541 | - if (! empty($level) && ! empty($message)) { |
|
| 541 | + if (!empty($level) && !empty($message)) { |
|
| 542 | 542 | return $logger->log($level, $message, $context); |
| 543 | 543 | } |
| 544 | 544 | |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | } |
| 547 | 547 | } |
| 548 | 548 | |
| 549 | -if (! function_exists('cache')) { |
|
| 549 | +if (!function_exists('cache')) { |
|
| 550 | 550 | /** |
| 551 | 551 | * Une méthode pratique qui donne accès au cache |
| 552 | 552 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | } |
| 577 | 577 | } |
| 578 | 578 | |
| 579 | -if (! function_exists('session')) { |
|
| 579 | +if (!function_exists('session')) { |
|
| 580 | 580 | /** |
| 581 | 581 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
| 582 | 582 | * |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | } |
| 600 | 600 | } |
| 601 | 601 | |
| 602 | -if (! function_exists('pr')) { |
|
| 602 | +if (!function_exists('pr')) { |
|
| 603 | 603 | /** |
| 604 | 604 | * print_r() convenience function. |
| 605 | 605 | * |
@@ -621,7 +621,7 @@ discard block |
||
| 621 | 621 | } |
| 622 | 622 | } |
| 623 | 623 | |
| 624 | -if (! function_exists('pj')) { |
|
| 624 | +if (!function_exists('pj')) { |
|
| 625 | 625 | /** |
| 626 | 626 | * json pretty print convenience function. |
| 627 | 627 | * |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | 644 | |
| 645 | -if (! function_exists('trigger_warning')) { |
|
| 645 | +if (!function_exists('trigger_warning')) { |
|
| 646 | 646 | /** |
| 647 | 647 | * Déclenche un E_USER_WARNING. |
| 648 | 648 | */ |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | } |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | -if (! function_exists('vd')) { |
|
| 655 | +if (!function_exists('vd')) { |
|
| 656 | 656 | /** |
| 657 | 657 | * Shortcut to ref, HTML mode |
| 658 | 658 | * |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | } |
| 665 | 665 | } |
| 666 | 666 | |
| 667 | -if (! function_exists('vdt')) { |
|
| 667 | +if (!function_exists('vdt')) { |
|
| 668 | 668 | /** |
| 669 | 669 | * Shortcut to ref, plain text mode |
| 670 | 670 | * |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | |
| 679 | 679 | // ================================= FONCTIONS DIVERSES ================================= // |
| 680 | 680 | |
| 681 | -if (! function_exists('force_https')) { |
|
| 681 | +if (!function_exists('force_https')) { |
|
| 682 | 682 | /** |
| 683 | 683 | * Utilisé pour forcer l'accès à une page via HTTPS. |
| 684 | 684 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | } |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | -if (! function_exists('getTypeName')) { |
|
| 739 | +if (!function_exists('getTypeName')) { |
|
| 740 | 740 | /** |
| 741 | 741 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
| 742 | 742 | * |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | } |
| 751 | 751 | } |
| 752 | 752 | |
| 753 | -if (! function_exists('ip_address')) { |
|
| 753 | +if (!function_exists('ip_address')) { |
|
| 754 | 754 | /** |
| 755 | 755 | * Renvoie l'adresse IP de l'utilisateur actuel |
| 756 | 756 | */ |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | } |
| 761 | 761 | } |
| 762 | 762 | |
| 763 | -if (! function_exists('is_really_writable')) { |
|
| 763 | +if (!function_exists('is_really_writable')) { |
|
| 764 | 764 | /** |
| 765 | 765 | * Tests d'inscriptibilité des fichiers |
| 766 | 766 | */ |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | } |
| 771 | 771 | } |
| 772 | 772 | |
| 773 | -if (! function_exists('lang')) { |
|
| 773 | +if (!function_exists('lang')) { |
|
| 774 | 774 | /** |
| 775 | 775 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 776 | 776 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -781,7 +781,7 @@ discard block |
||
| 781 | 781 | } |
| 782 | 782 | } |
| 783 | 783 | |
| 784 | -if (! function_exists('namespace_split')) { |
|
| 784 | +if (!function_exists('namespace_split')) { |
|
| 785 | 785 | /** |
| 786 | 786 | * Séparez l'espace de noms du nom de classe. |
| 787 | 787 | * |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | } |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | -if (! function_exists('view_exist')) { |
|
| 805 | +if (!function_exists('view_exist')) { |
|
| 806 | 806 | /** |
| 807 | 807 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
| 808 | 808 | */ |
@@ -816,7 +816,7 @@ discard block |
||
| 816 | 816 | } |
| 817 | 817 | } |
| 818 | 818 | |
| 819 | -if (! function_exists('view')) { |
|
| 819 | +if (!function_exists('view')) { |
|
| 820 | 820 | /** |
| 821 | 821 | * Charge une vue |
| 822 | 822 | * |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | } |
| 833 | 833 | } |
| 834 | 834 | |
| 835 | -if (! function_exists('flash')) { |
|
| 835 | +if (!function_exists('flash')) { |
|
| 836 | 836 | /** |
| 837 | 837 | * Fournisseur d'acces rapide a la classe PHP Flash |
| 838 | 838 | * |
@@ -864,7 +864,7 @@ discard block |
||
| 864 | 864 | }*/ |
| 865 | 865 | } |
| 866 | 866 | |
| 867 | -if (! function_exists('geo_ip')) { |
|
| 867 | +if (!function_exists('geo_ip')) { |
|
| 868 | 868 | /** |
| 869 | 869 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
| 870 | 870 | */ |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | } |
| 875 | 875 | } |
| 876 | 876 | |
| 877 | -if (! function_exists('to_stream')) { |
|
| 877 | +if (!function_exists('to_stream')) { |
|
| 878 | 878 | /** |
| 879 | 879 | * Créez un nouveau flux basé sur le type d'entrée. |
| 880 | 880 | * |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | } |
| 898 | 898 | } |
| 899 | 899 | |
| 900 | -if (! function_exists('value')) { |
|
| 900 | +if (!function_exists('value')) { |
|
| 901 | 901 | /** |
| 902 | 902 | * Renvoie la valeur par défaut de la valeur donnée. |
| 903 | 903 | */ |
@@ -907,7 +907,7 @@ discard block |
||
| 907 | 907 | } |
| 908 | 908 | } |
| 909 | 909 | |
| 910 | -if (! function_exists('collect')) { |
|
| 910 | +if (!function_exists('collect')) { |
|
| 911 | 911 | /** |
| 912 | 912 | * Créez une collection à partir de la valeur donnée. |
| 913 | 913 | */ |
@@ -917,7 +917,7 @@ discard block |
||
| 917 | 917 | } |
| 918 | 918 | } |
| 919 | 919 | |
| 920 | -if (! function_exists('with')) { |
|
| 920 | +if (!function_exists('with')) { |
|
| 921 | 921 | /** |
| 922 | 922 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
| 923 | 923 | * |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | } |
| 930 | 930 | } |
| 931 | 931 | |
| 932 | -if (! function_exists('tap')) { |
|
| 932 | +if (!function_exists('tap')) { |
|
| 933 | 933 | /** |
| 934 | 934 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
| 935 | 935 | */ |
@@ -939,7 +939,7 @@ discard block |
||
| 939 | 939 | } |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | -if (! function_exists('last')) { |
|
| 942 | +if (!function_exists('last')) { |
|
| 943 | 943 | /** |
| 944 | 944 | * Recupere le dernier element d'un tableau |
| 945 | 945 | */ |
@@ -949,7 +949,7 @@ discard block |
||
| 949 | 949 | } |
| 950 | 950 | } |
| 951 | 951 | |
| 952 | -if (! function_exists('invade')) { |
|
| 952 | +if (!function_exists('invade')) { |
|
| 953 | 953 | /** |
| 954 | 954 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
| 955 | 955 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |