@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $this->getModel(); |
| 93 | 93 | |
| 94 | - if (! empty($this->helpers)) { |
|
| 94 | + if (!empty($this->helpers)) { |
|
| 95 | 95 | helper($this->helpers); |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | $this->modelName = is_object($which) ? null : $which; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - if (empty($this->model) && ! empty($this->modelName) && class_exists($this->modelName)) { |
|
| 112 | + if (empty($this->model) && !empty($this->modelName) && class_exists($this->modelName)) { |
|
| 113 | 113 | $this->model = model($this->modelName); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - if (! empty($this->model) && empty($this->modelName)) { |
|
| 116 | + if (!empty($this->model) && empty($this->modelName)) { |
|
| 117 | 117 | $this->modelName = get_class($this->model); |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | private function getModel() |
| 153 | 153 | { |
| 154 | - if (! empty($this->modelName)) { |
|
| 154 | + if (!empty($this->modelName)) { |
|
| 155 | 155 | $model = $this->modelName; |
| 156 | 156 | } else { |
| 157 | 157 | $model = str_replace('Controller', 'Model', static::class); |
@@ -57,11 +57,11 @@ discard block |
||
| 57 | 57 | $group = on_test() ? 'test' : (on_prod() ? 'production' : 'development'); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - if (! isset($config[$group])) { |
|
| 60 | + if (!isset($config[$group])) { |
|
| 61 | 61 | $group = 'default'; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if (is_string($group) && ! isset($config[$group]) && strpos($group, 'custom-') !== 0) { |
|
| 64 | + if (is_string($group) && !isset($config[$group]) && strpos($group, 'custom-') !== 0) { |
|
| 65 | 65 | throw new InvalidArgumentException($group . ' is not a valid database connection group.'); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | $config = $config[$group]; |
| 73 | 73 | |
| 74 | - if (str_contains($config['driver'], 'sqlite') && $config['database'] !== ':memory:' && ! str_contains($config['database'], DS)) { |
|
| 74 | + if (str_contains($config['driver'], 'sqlite') && $config['database'] !== ':memory:' && !str_contains($config['database'], DS)) { |
|
| 75 | 75 | $config['database'] = APP_STORAGE_PATH . $config['database']; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -39,16 +39,16 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // services système |
| 41 | 41 | $filename = SYST_PATH . 'Constants' . DS . 'providers.php'; |
| 42 | - if (! file_exists($filename)) { |
|
| 42 | + if (!file_exists($filename)) { |
|
| 43 | 43 | throw LoadException::providersDefinitionDontExist($filename); |
| 44 | 44 | } |
| 45 | - if (! in_array($filename, get_included_files(), true)) { |
|
| 45 | + if (!in_array($filename, get_included_files(), true)) { |
|
| 46 | 46 | $providers = array_merge($providers, require $filename); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | // services de l'application |
| 50 | 50 | $filename = CONFIG_PATH . 'providers.php'; |
| 51 | - if (file_exists($filename) && ! in_array($filename, get_included_files(), true)) { |
|
| 51 | + if (file_exists($filename) && !in_array($filename, get_included_files(), true)) { |
|
| 52 | 52 | $providers = array_merge($providers, require $filename); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | return $models; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if (! self::isLoaded('models', $model)) { |
|
| 100 | + if (!self::isLoaded('models', $model)) { |
|
| 101 | 101 | self::loaded('models', $model, FileLocator::model($model, $connection)); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private static function isLoaded(string $module, $element): bool |
| 113 | 113 | { |
| 114 | - if (! isset(self::$loads[$module]) || ! is_array(self::$loads[$module])) { |
|
| 114 | + if (!isset(self::$loads[$module]) || !is_array(self::$loads[$module])) { |
|
| 115 | 115 | return false; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -477,7 +477,7 @@ |
||
| 477 | 477 | $name = array_shift($arguments); |
| 478 | 478 | |
| 479 | 479 | if (empty(static::$instances[$name])) { |
| 480 | - if (! empty($arguments)) { |
|
| 480 | + if (!empty($arguments)) { |
|
| 481 | 481 | static::$instances[$name] = static::factory($name, $arguments); |
| 482 | 482 | } else { |
| 483 | 483 | static::$instances[$name] = static::injector()->get($name); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | throw LoadException::libraryNotFound($lib); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if (true !== $file_syst && ! class_exists($lib)) { |
|
| 83 | + if (true !== $file_syst && !class_exists($lib)) { |
|
| 84 | 84 | throw LoadException::libraryDontExist($lib); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -98,16 +98,16 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public static function model(string $model, ?ConnectionInterface $connection = null) |
| 100 | 100 | { |
| 101 | - if (! class_exists($model) && ! Text::endsWith($model, 'Model')) { |
|
| 101 | + if (!class_exists($model) && !Text::endsWith($model, 'Model')) { |
|
| 102 | 102 | $model .= 'Model'; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | - if (! class_exists($model)) { |
|
| 105 | + if (!class_exists($model)) { |
|
| 106 | 106 | $model = str_replace(APP_NAMESPACE . '\\Models\\', '', $model); |
| 107 | 107 | $model = APP_NAMESPACE . '\\Models\\' . $model; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - if (! class_exists($model)) { |
|
| 110 | + if (!class_exists($model)) { |
|
| 111 | 111 | throw LoadException::modelNotFound($model); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $controller = explode('/', $controller); |
| 126 | 126 | |
| 127 | 127 | $con = ucfirst(end($controller)); |
| 128 | - $con = (! preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con; |
|
| 128 | + $con = (!preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con; |
|
| 129 | 129 | $controller[count($controller) - 1] = $con; |
| 130 | 130 | |
| 131 | 131 | foreach ($controller as $key => &$value) { |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | $path = CONTROLLER_PATH . Helpers::ensureExt(implode(DS, $controller), 'php'); |
| 138 | 138 | |
| 139 | - if (! file_exists($path)) { |
|
| 139 | + if (!file_exists($path)) { |
|
| 140 | 140 | throw LoadException::controllerNotFound(str_replace('Controller', '', $con), $path); |
| 141 | 141 | } |
| 142 | 142 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | if (class_exists($class_namespaced, false)) { |
| 148 | 148 | return Injector::make($class_namespaced); |
| 149 | 149 | } |
| 150 | - if (! class_exists($con, false)) { |
|
| 150 | + if (!class_exists($con, false)) { |
|
| 151 | 151 | throw LoadException::controllerDontExist(str_replace('Controller', '', $con), $path); |
| 152 | 152 | } |
| 153 | 153 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | protected static function verifyPreferApp(array $options, string $name): bool |
| 177 | 177 | { |
| 178 | 178 | // Tout element sans restriction passe |
| 179 | - if (! $options['preferApp']) { |
|
| 179 | + if (!$options['preferApp']) { |
|
| 180 | 180 | return true; |
| 181 | 181 | } |
| 182 | 182 | |
@@ -429,7 +429,7 @@ |
||
| 429 | 429 | */ |
| 430 | 430 | protected function idValue(array|object $data) |
| 431 | 431 | { |
| 432 | - if (is_object($data) && isset($data->{$this->primaryKey})) { |
|
| 432 | + if (is_object($data) && isset($data->{$this->primaryKey})) { |
|
| 433 | 433 | return $data->{$this->primaryKey}; |
| 434 | 434 | } |
| 435 | 435 | |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | // S'assurer qu'on a une bonne connxion a la base de donnees |
| 243 | - if (! $this->db instanceof ConnectionInterface) { |
|
| 243 | + if (!$this->db instanceof ConnectionInterface) { |
|
| 244 | 244 | $this->db = Database::connect($this->group); |
| 245 | 245 | } |
| 246 | 246 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | public function create(array|object|null $data = null, bool $returnID = true) |
| 274 | 274 | { |
| 275 | - if (! empty($this->tempData['data'])) { |
|
| 275 | + if (!empty($this->tempData['data'])) { |
|
| 276 | 276 | if (empty($data)) { |
| 277 | 277 | $data = $this->tempData['data']; |
| 278 | 278 | } else { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | { |
| 316 | 316 | $id = $id ?: $this->primaryKeyValue; |
| 317 | 317 | |
| 318 | - if (! empty($this->tempData['data'])) { |
|
| 318 | + if (!empty($this->tempData['data'])) { |
|
| 319 | 319 | if (empty($data)) { |
| 320 | 320 | $data = $this->tempData['data']; |
| 321 | 321 | } else { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | return $data->{$this->primaryKey}; |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | - if (is_array($data) && ! empty($data[$this->primaryKey])) { |
|
| 436 | + if (is_array($data) && !empty($data[$this->primaryKey])) { |
|
| 437 | 437 | return $data[$this->primaryKey]; |
| 438 | 438 | } |
| 439 | 439 | |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | */ |
| 447 | 447 | protected function shouldUpdate(array|object $data): bool |
| 448 | 448 | { |
| 449 | - return ! empty($this->idValue($data)); |
|
| 449 | + return !empty($this->idValue($data)); |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | /** |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | |
| 465 | 465 | // Convertissez toutes les instances de Date en $dateFormat approprié |
| 466 | 466 | if ($properties) { |
| 467 | - $properties = array_map(function ($value) { |
|
| 467 | + $properties = array_map(function($value) { |
|
| 468 | 468 | if ($value instanceof Date) { |
| 469 | 469 | return $this->timeToDate($value); |
| 470 | 470 | } |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | $properties = $data->toArray(); |
| 493 | 493 | } else { |
| 494 | 494 | $mirror = new ReflectionClass($data); |
| 495 | - $props = $mirror->getProperties(ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED); |
|
| 495 | + $props = $mirror->getProperties(ReflectionProperty::IS_PUBLIC|ReflectionProperty::IS_PROTECTED); |
|
| 496 | 496 | |
| 497 | 497 | $properties = []; |
| 498 | 498 | |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | */ |
| 547 | 547 | protected function transformDataToArray(array|object|null $data, string $type): array |
| 548 | 548 | { |
| 549 | - if (! in_array($type, ['insert', 'update'], true)) { |
|
| 549 | + if (!in_array($type, ['insert', 'update'], true)) { |
|
| 550 | 550 | throw new InvalidArgumentException(sprintf('Invalid type "%s" used upon transforming data to array.', $type)); |
| 551 | 551 | } |
| 552 | 552 | |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | |
| 557 | 557 | // Si $data utilise une classe personnalisée avec des propriétés publiques ou protégées représentant |
| 558 | 558 | // les éléments de la collection, nous devons les saisir sous forme de tableau. |
| 559 | - if (is_object($data) && ! $data instanceof stdClass) { |
|
| 559 | + if (is_object($data) && !$data instanceof stdClass) { |
|
| 560 | 560 | $data = $this->objectToArray($data, $type === 'update', true); |
| 561 | 561 | } |
| 562 | 562 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | } |
| 568 | 568 | |
| 569 | 569 | // S'il est toujours vide ici, cela signifie que $data n'a pas changé ou est un objet vide |
| 570 | - if (! $this->allowEmptyInserts && empty($data)) { |
|
| 570 | + if (!$this->allowEmptyInserts && empty($data)) { |
|
| 571 | 571 | throw DataException::emptyDataset($type); |
| 572 | 572 | } |
| 573 | 573 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | // ================================= FONCTIONS D'ACCESSIBILITE ================================= // |
| 26 | 26 | |
| 27 | -if (! function_exists('env')) { |
|
| 27 | +if (!function_exists('env')) { |
|
| 28 | 28 | /** |
| 29 | 29 | * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation |
| 30 | 30 | * pour les variables d'environnement non prises en charge ou incohérentes |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -if (! function_exists('helper')) { |
|
| 43 | +if (!function_exists('helper')) { |
|
| 44 | 44 | /** |
| 45 | 45 | * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms, |
| 46 | 46 | * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms. |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | -if (! function_exists('model')) { |
|
| 61 | +if (!function_exists('model')) { |
|
| 62 | 62 | /** |
| 63 | 63 | * Simple maniere d'obtenir un modele. |
| 64 | 64 | * |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @return T |
| 70 | 70 | */ |
| 71 | - function model(string|array $name, ?ConnectionInterface &$conn = null) |
|
| 71 | + function model(string|array $name, ?ConnectionInterface&$conn = null) |
|
| 72 | 72 | { |
| 73 | 73 | return Load::model($name, $conn); |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -if (! function_exists('service')) { |
|
| 77 | +if (!function_exists('service')) { |
|
| 78 | 78 | /** |
| 79 | 79 | * Permet un accès plus propre au fichier de configuration des services. |
| 80 | 80 | * Renvoie toujours une instance SHARED de la classe, donc |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | -if (! function_exists('single_service')) { |
|
| 94 | +if (!function_exists('single_service')) { |
|
| 95 | 95 | /** |
| 96 | 96 | * Autoriser l'accès propre à un service. |
| 97 | 97 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | -if (! function_exists('show404')) { |
|
| 108 | +if (!function_exists('show404')) { |
|
| 109 | 109 | /** |
| 110 | 110 | * Afficher une page 404 introuvable dans le navigateur |
| 111 | 111 | */ |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | -if (! function_exists('config')) { |
|
| 118 | +if (!function_exists('config')) { |
|
| 119 | 119 | /** |
| 120 | 120 | * GET/SET App config |
| 121 | 121 | * |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | function config(string $config, $value = null, bool $force_set = false) |
| 127 | 127 | { |
| 128 | - if (! empty($value) || (empty($value) && true === $force_set)) { |
|
| 128 | + if (!empty($value) || (empty($value) && true === $force_set)) { |
|
| 129 | 129 | Config::set($config, $value); |
| 130 | 130 | } |
| 131 | 131 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
| 137 | 137 | |
| 138 | -if (! function_exists('esc')) { |
|
| 138 | +if (!function_exists('esc')) { |
|
| 139 | 139 | /** |
| 140 | 140 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
| 141 | 141 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | -if (! function_exists('h')) { |
|
| 165 | +if (!function_exists('h')) { |
|
| 166 | 166 | /** |
| 167 | 167 | * Méthode pratique pour htmlspecialchars. |
| 168 | 168 | * |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | -if (! function_exists('purify')) { |
|
| 184 | +if (!function_exists('purify')) { |
|
| 185 | 185 | /** |
| 186 | 186 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
| 187 | 187 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | -if (! function_exists('remove_invisible_characters')) { |
|
| 202 | +if (!function_exists('remove_invisible_characters')) { |
|
| 203 | 203 | /** |
| 204 | 204 | * Supprimer les caractères invisibles |
| 205 | 205 | * |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | -if (! function_exists('stringify_attributes')) { |
|
| 215 | +if (!function_exists('stringify_attributes')) { |
|
| 216 | 216 | /** |
| 217 | 217 | * Chaîner les attributs à utiliser dans les balises HTML. |
| 218 | 218 | * |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
| 228 | 228 | |
| 229 | -if (! function_exists('on_dev')) { |
|
| 229 | +if (!function_exists('on_dev')) { |
|
| 230 | 230 | /** |
| 231 | 231 | * Testez pour voir si nous sommes dans un environnement de développement. |
| 232 | 232 | */ |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | -if (! function_exists('on_prod')) { |
|
| 245 | +if (!function_exists('on_prod')) { |
|
| 246 | 246 | /** |
| 247 | 247 | * Testez pour voir si nous sommes dans un environnement de production. |
| 248 | 248 | */ |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | -if (! function_exists('on_test')) { |
|
| 261 | +if (!function_exists('on_test')) { |
|
| 262 | 262 | /** |
| 263 | 263 | * Testez pour voir si nous sommes dans un environnement de test |
| 264 | 264 | */ |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | -if (! function_exists('is_cli')) { |
|
| 273 | +if (!function_exists('is_cli')) { |
|
| 274 | 274 | /** |
| 275 | 275 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
| 276 | 276 | */ |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | -if (! function_exists('is_php')) { |
|
| 283 | +if (!function_exists('is_php')) { |
|
| 284 | 284 | /** |
| 285 | 285 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
| 286 | 286 | */ |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | } |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | -if (! function_exists('is_windows')) { |
|
| 293 | +if (!function_exists('is_windows')) { |
|
| 294 | 294 | /** |
| 295 | 295 | * Déterminez si l'environnement actuel est basé sur Windows. |
| 296 | 296 | */ |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | -if (! function_exists('is_https')) { |
|
| 303 | +if (!function_exists('is_https')) { |
|
| 304 | 304 | /** |
| 305 | 305 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
| 306 | 306 | */ |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | } |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | -if (! function_exists('is_localfile')) { |
|
| 313 | +if (!function_exists('is_localfile')) { |
|
| 314 | 314 | /** |
| 315 | 315 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
| 316 | 316 | */ |
@@ -320,11 +320,11 @@ discard block |
||
| 320 | 320 | return true; |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | - return ! preg_match('#^(https?://)#i', $name); |
|
| 323 | + return !preg_match('#^(https?://)#i', $name); |
|
| 324 | 324 | } |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | -if (! function_exists('is_online')) { |
|
| 327 | +if (!function_exists('is_online')) { |
|
| 328 | 328 | /** |
| 329 | 329 | * Tester si l'application s'exécute en local ou en ligne. |
| 330 | 330 | */ |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | -if (! function_exists('is_connected')) { |
|
| 337 | +if (!function_exists('is_connected')) { |
|
| 338 | 338 | /** |
| 339 | 339 | * Verifie si l'utilisateur a une connexion internet active. |
| 340 | 340 | */ |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | } |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | -if (! function_exists('is_ajax_request')) { |
|
| 347 | +if (!function_exists('is_ajax_request')) { |
|
| 348 | 348 | /** |
| 349 | 349 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
| 350 | 350 | */ |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | -if (! function_exists('redirection')) { |
|
| 357 | +if (!function_exists('redirection')) { |
|
| 358 | 358 | /** |
| 359 | 359 | * Redirige l'utilisateur |
| 360 | 360 | */ |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | -if (! function_exists('redirect')) { |
|
| 371 | +if (!function_exists('redirect')) { |
|
| 372 | 372 | /** |
| 373 | 373 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
| 374 | 374 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | { |
| 383 | 383 | $redirection = Services::redirection(); |
| 384 | 384 | |
| 385 | - if (! empty($uri)) { |
|
| 385 | + if (!empty($uri)) { |
|
| 386 | 386 | return $redirection->route($uri); |
| 387 | 387 | } |
| 388 | 388 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | -if (! function_exists('link_to')) { |
|
| 393 | +if (!function_exists('link_to')) { |
|
| 394 | 394 | /** |
| 395 | 395 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
| 396 | 396 | * tentera de créer l'URL relative à la route correspondante. |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } |
| 407 | 407 | } |
| 408 | 408 | |
| 409 | -if (! function_exists('clean_path')) { |
|
| 409 | +if (!function_exists('clean_path')) { |
|
| 410 | 410 | /** |
| 411 | 411 | * Une méthode pratique pour nettoyer les chemins pour |
| 412 | 412 | * une sortie plus belle. Utile pour les exceptions |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | } |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | -if (! function_exists('old')) { |
|
| 438 | +if (!function_exists('old')) { |
|
| 439 | 439 | /** |
| 440 | 440 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
| 441 | 441 | * |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | |
| 463 | 463 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
| 464 | 464 | |
| 465 | -if (! function_exists('dd')) { |
|
| 465 | +if (!function_exists('dd')) { |
|
| 466 | 466 | /** |
| 467 | 467 | * Prints a Kint debug report and exits. |
| 468 | 468 | * |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | } |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | -if (! function_exists('dump')) { |
|
| 484 | +if (!function_exists('dump')) { |
|
| 485 | 485 | /** |
| 486 | 486 | * Prints a Kint debug report and exits. |
| 487 | 487 | * |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | } |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | -if (! function_exists('deprecationWarning')) { |
|
| 501 | +if (!function_exists('deprecationWarning')) { |
|
| 502 | 502 | /** |
| 503 | 503 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
| 504 | 504 | * |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | } |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | -if (! function_exists('logger')) { |
|
| 517 | +if (!function_exists('logger')) { |
|
| 518 | 518 | /** |
| 519 | 519 | * A convenience/compatibility method for logging events through |
| 520 | 520 | * the Log system. |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | { |
| 538 | 538 | $logger = Services::logger(); |
| 539 | 539 | |
| 540 | - if (! empty($level) && ! empty($message)) { |
|
| 540 | + if (!empty($level) && !empty($message)) { |
|
| 541 | 541 | return $logger->log($level, $message, $context); |
| 542 | 542 | } |
| 543 | 543 | |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | } |
| 546 | 546 | } |
| 547 | 547 | |
| 548 | -if (! function_exists('cache')) { |
|
| 548 | +if (!function_exists('cache')) { |
|
| 549 | 549 | /** |
| 550 | 550 | * Une méthode pratique qui donne accès au cache |
| 551 | 551 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | } |
| 576 | 576 | } |
| 577 | 577 | |
| 578 | -if (! function_exists('session')) { |
|
| 578 | +if (!function_exists('session')) { |
|
| 579 | 579 | /** |
| 580 | 580 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
| 581 | 581 | * |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | } |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | -if (! function_exists('pr')) { |
|
| 601 | +if (!function_exists('pr')) { |
|
| 602 | 602 | /** |
| 603 | 603 | * print_r() convenience function. |
| 604 | 604 | * |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | } |
| 621 | 621 | } |
| 622 | 622 | |
| 623 | -if (! function_exists('pj')) { |
|
| 623 | +if (!function_exists('pj')) { |
|
| 624 | 624 | /** |
| 625 | 625 | * json pretty print convenience function. |
| 626 | 626 | * |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | } |
| 642 | 642 | } |
| 643 | 643 | |
| 644 | -if (! function_exists('trigger_warning')) { |
|
| 644 | +if (!function_exists('trigger_warning')) { |
|
| 645 | 645 | /** |
| 646 | 646 | * Déclenche un E_USER_WARNING. |
| 647 | 647 | */ |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | } |
| 652 | 652 | } |
| 653 | 653 | |
| 654 | -if (! function_exists('vd')) { |
|
| 654 | +if (!function_exists('vd')) { |
|
| 655 | 655 | /** |
| 656 | 656 | * Shortcut to ref, HTML mode |
| 657 | 657 | * |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | } |
| 664 | 664 | } |
| 665 | 665 | |
| 666 | -if (! function_exists('vdt')) { |
|
| 666 | +if (!function_exists('vdt')) { |
|
| 667 | 667 | /** |
| 668 | 668 | * Shortcut to ref, plain text mode |
| 669 | 669 | * |
@@ -677,7 +677,7 @@ discard block |
||
| 677 | 677 | |
| 678 | 678 | // ================================= FONCTIONS DIVERSES ================================= // |
| 679 | 679 | |
| 680 | -if (! function_exists('force_https')) { |
|
| 680 | +if (!function_exists('force_https')) { |
|
| 681 | 681 | /** |
| 682 | 682 | * Utilisé pour forcer l'accès à une page via HTTPS. |
| 683 | 683 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | } |
| 736 | 736 | } |
| 737 | 737 | |
| 738 | -if (! function_exists('getTypeName')) { |
|
| 738 | +if (!function_exists('getTypeName')) { |
|
| 739 | 739 | /** |
| 740 | 740 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
| 741 | 741 | * |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | } |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | -if (! function_exists('ip_address')) { |
|
| 752 | +if (!function_exists('ip_address')) { |
|
| 753 | 753 | /** |
| 754 | 754 | * Renvoie l'adresse IP de l'utilisateur actuel |
| 755 | 755 | */ |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | } |
| 760 | 760 | } |
| 761 | 761 | |
| 762 | -if (! function_exists('is_really_writable')) { |
|
| 762 | +if (!function_exists('is_really_writable')) { |
|
| 763 | 763 | /** |
| 764 | 764 | * Tests d'inscriptibilité des fichiers |
| 765 | 765 | */ |
@@ -769,7 +769,7 @@ discard block |
||
| 769 | 769 | } |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | -if (! function_exists('lang')) { |
|
| 772 | +if (!function_exists('lang')) { |
|
| 773 | 773 | /** |
| 774 | 774 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
| 775 | 775 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -780,7 +780,7 @@ discard block |
||
| 780 | 780 | } |
| 781 | 781 | } |
| 782 | 782 | |
| 783 | -if (! function_exists('namespace_split')) { |
|
| 783 | +if (!function_exists('namespace_split')) { |
|
| 784 | 784 | /** |
| 785 | 785 | * Séparez l'espace de noms du nom de classe. |
| 786 | 786 | * |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | } |
| 802 | 802 | } |
| 803 | 803 | |
| 804 | -if (! function_exists('view_exist')) { |
|
| 804 | +if (!function_exists('view_exist')) { |
|
| 805 | 805 | /** |
| 806 | 806 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
| 807 | 807 | */ |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | } |
| 816 | 816 | } |
| 817 | 817 | |
| 818 | -if (! function_exists('view')) { |
|
| 818 | +if (!function_exists('view')) { |
|
| 819 | 819 | /** |
| 820 | 820 | * Charge une vue |
| 821 | 821 | * |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | } |
| 832 | 832 | } |
| 833 | 833 | |
| 834 | -if (! function_exists('flash')) { |
|
| 834 | +if (!function_exists('flash')) { |
|
| 835 | 835 | /** |
| 836 | 836 | * Fournisseur d'acces rapide a la classe PHP Flash |
| 837 | 837 | * |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | }*/ |
| 864 | 864 | } |
| 865 | 865 | |
| 866 | -if (! function_exists('geo_ip')) { |
|
| 866 | +if (!function_exists('geo_ip')) { |
|
| 867 | 867 | /** |
| 868 | 868 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
| 869 | 869 | */ |
@@ -873,7 +873,7 @@ discard block |
||
| 873 | 873 | } |
| 874 | 874 | } |
| 875 | 875 | |
| 876 | -if (! function_exists('to_stream')) { |
|
| 876 | +if (!function_exists('to_stream')) { |
|
| 877 | 877 | /** |
| 878 | 878 | * Créez un nouveau flux basé sur le type d'entrée. |
| 879 | 879 | * |
@@ -896,7 +896,7 @@ discard block |
||
| 896 | 896 | } |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | -if (! function_exists('value')) { |
|
| 899 | +if (!function_exists('value')) { |
|
| 900 | 900 | /** |
| 901 | 901 | * Renvoie la valeur par défaut de la valeur donnée. |
| 902 | 902 | */ |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | } |
| 907 | 907 | } |
| 908 | 908 | |
| 909 | -if (! function_exists('collect')) { |
|
| 909 | +if (!function_exists('collect')) { |
|
| 910 | 910 | /** |
| 911 | 911 | * Créez une collection à partir de la valeur donnée. |
| 912 | 912 | */ |
@@ -916,7 +916,7 @@ discard block |
||
| 916 | 916 | } |
| 917 | 917 | } |
| 918 | 918 | |
| 919 | -if (! function_exists('with')) { |
|
| 919 | +if (!function_exists('with')) { |
|
| 920 | 920 | /** |
| 921 | 921 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
| 922 | 922 | * |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | } |
| 929 | 929 | } |
| 930 | 930 | |
| 931 | -if (! function_exists('tap')) { |
|
| 931 | +if (!function_exists('tap')) { |
|
| 932 | 932 | /** |
| 933 | 933 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
| 934 | 934 | */ |