Passed
Push — main ( 79ccdf...097cc9 )
by Dimitri
03:17
created
src/Debug/Toolbar/views/toolbar.tpl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         </span>
43 43
 
44 44
         <?php foreach ($collectors as $c) : ?>
45
-            <?php if (! $c['isEmpty'] && ($c['hasTabContent'] || $c['hasLabel'])) : ?>
45
+            <?php if (!$c['isEmpty'] && ($c['hasTabContent'] || $c['hasLabel'])) : ?>
46 46
                 <span class="blitzphp-label">
47 47
                     <a href="javascript: void(0)" data-tab="blitzphp-<?= $c['titleSafe'] ?>">
48 48
                         <img src="<?= $c['icon'] ?>">
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     <!-- Collector-provided Tabs -->
104 104
     <?php foreach ($collectors as $c) : ?>
105
-        <?php if (! $c['isEmpty']) : ?>
105
+        <?php if (!$c['isEmpty']) : ?>
106 106
             <?php if ($c['hasTabContent']) : ?>
107 107
                 <div id="blitzphp-<?= $c['titleSafe'] ?>" class="tab">
108 108
                     <h2><?= $c['title'] ?> <span><?= $c['titleDetails'] ?></span></h2>
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         </a>
150 150
 
151 151
         <?php if (isset($vars['session'])) : ?>
152
-            <?php if (! empty($vars['session'])) : ?>
152
+            <?php if (!empty($vars['session'])) : ?>
153 153
                 <table id="session_table">
154 154
                     <tbody>
155 155
                     <?php foreach ($vars['session'] as $key => $value) : ?>
Please login to merge, or discard this patch.
src/Debug/Toolbar.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $this->config = $config ?? (object) config('toolbar');
67 67
 
68 68
         foreach ($this->config->collectors as $collector) {
69
-            if (! class_exists($collector)) {
69
+            if (!class_exists($collector)) {
70 70
                 logger()->critical(
71 71
                     'Toolbar collector does not exist (' . $collector . ').'
72 72
                     . ' Please check $collectors in the app/Config/toolbar.php file.'
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             $data['vars']['varData'][esc($heading)] = $varData;
133 133
         }
134 134
 
135
-        if (! empty($_SESSION)) {
135
+        if (!empty($_SESSION)) {
136 136
             foreach ($_SESSION as $key => $value) {
137 137
                 // Remplacez les données binaires par une chaîne pour éviter l'échec de json_encode.
138 138
                 if (is_string($value) && preg_match('~[^\x20-\x7E\t\r\n]~', $value)) {
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
         $output = '';
206 206
 
207 207
         foreach ($rows as $row) {
208
-            $hasChildren = isset($row['children']) && ! empty($row['children']);
209
-            $isQuery     = isset($row['query']) && ! empty($row['query']);
208
+            $hasChildren = isset($row['children']) && !empty($row['children']);
209
+            $isQuery     = isset($row['query']) && !empty($row['query']);
210 210
 
211 211
             // Ouvrir la chronologie du contrôleur par défaut
212 212
             $open = $row['name'] === 'Controller';
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         // Le collecter
273 273
         foreach ($collectors as $collector) {
274
-            if (! $collector['hasTimelineData']) {
274
+            if (!$collector['hasTimelineData']) {
275 275
                 continue;
276 276
             }
277 277
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         array_multisort(...$sortArray);
289 289
 
290 290
         // Ajouter une heure de fin à chaque élément
291
-        array_walk($data, static function (&$row) {
291
+        array_walk($data, static function(&$row) {
292 292
             $row['end'] = $row['start'] + $row['duration'];
293 293
         });
294 294
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
         $element = array_shift($elements);
308 308
 
309 309
         // Si nous avons des enfants derrière nous, récupérez-les et attachez-les-nous
310
-        while (! empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) {
310
+        while (!empty($elements) && $elements[array_key_first($elements)]['end'] <= $element['end']) {
311 311
             $element['children'][] = array_shift($elements);
312 312
         }
313 313
 
@@ -331,14 +331,14 @@  discard block
 block discarded – undo
331 331
      */
332 332
     protected function collectVarData(): array
333 333
     {
334
-        if (! ($this->config->collectVarData ?? true)) {
334
+        if (!($this->config->collectVarData ?? true)) {
335 335
             return [];
336 336
         }
337 337
 
338 338
         $data = [];
339 339
 
340 340
         foreach ($this->collectors as $collector) {
341
-            if (! $collector->hasVarData()) {
341
+            if (!$collector->hasVarData()) {
342 342
                 continue;
343 343
             }
344 344
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         }
373 373
 
374 374
         // Si on a desactiver le debogage ou l'affichage de la debugbar, on s'arrete
375
-        if (! BLITZ_DEBUG || ! $this->config->show_debugbar) {
375
+        if (!BLITZ_DEBUG || !$this->config->show_debugbar) {
376 376
             return $response;
377 377
         }
378 378
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         // Mise à jour vers microtime() pour que nous puissions obtenir l'historique
388 388
         $time = sprintf('%.6f', Date::now()->format('U.u'));
389 389
 
390
-        if (! is_dir($this->debugPath)) {
390
+        if (!is_dir($this->debugPath)) {
391 391
             mkdir($this->debugPath, 0777);
392 392
         }
393 393
 
Please login to merge, or discard this patch.
src/Config/Config.php 2 patches
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -25,49 +25,49 @@  discard block
 block discarded – undo
25 25
      */
26 26
     private static array $loaded = [];
27 27
 
28
-	/**
29
-	 * Drapeau permettant de savoir si la config a deja ete initialiser
30
-	 */
31
-	private static bool $initialized = false;
28
+    /**
29
+     * Drapeau permettant de savoir si la config a deja ete initialiser
30
+     */
31
+    private static bool $initialized = false;
32 32
 
33
-	private Configurator $configurator;
33
+    private Configurator $configurator;
34 34
 
35 35
     public function __construct()
36 36
     {
37
-		$this->configurator = new Configurator();
38
-		$this->initialize();
37
+        $this->configurator = new Configurator();
38
+        $this->initialize();
39 39
     }
40 40
 
41
-	/**
41
+    /**
42 42
      * Détermine si une clé de configuration existe.
43 43
      */
44
-	public function exists(string $key): bool
45
-	{
46
-		if (! $this->configurator->exists($key)) {
47
-			$config = explode('.', $key);
48
-        	$this->load($config[0]);
44
+    public function exists(string $key): bool
45
+    {
46
+        if (! $this->configurator->exists($key)) {
47
+            $config = explode('.', $key);
48
+            $this->load($config[0]);
49 49
 
50
-        	return $this->configurator->exists(implode('.', $config));
51
-		}
50
+            return $this->configurator->exists(implode('.', $config));
51
+        }
52 52
 
53
-		return true;
54
-	}
53
+        return true;
54
+    }
55 55
 
56
-	/**
56
+    /**
57 57
      * Détermine s'il y'a une clé de configuration.
58 58
      */
59
-	public function has(string $key): bool
60
-	{
61
-		return $this->exists($key);
62
-	}
59
+    public function has(string $key): bool
60
+    {
61
+        return $this->exists($key);
62
+    }
63 63
 
64
-	/**
64
+    /**
65 65
      * Détermine s'il manque une clé de configuration.
66 66
      */
67
-	public function missing(string $key): bool
68
-	{
69
-		return ! $this->exists($key);
70
-	}
67
+    public function missing(string $key): bool
68
+    {
69
+        return ! $this->exists($key);
70
+    }
71 71
 
72 72
     /**
73 73
      * Renvoyer une configuration de l'application
@@ -80,21 +80,21 @@  discard block
 block discarded – undo
80 80
             return $this->configurator->get($key);
81 81
         }
82 82
 
83
-		if (func_num_args() > 1) {
84
-			return $default;
85
-		}
83
+        if (func_num_args() > 1) {
84
+            return $default;
85
+        }
86 86
 		
87
-		$path = explode('.', $key);
87
+        $path = explode('.', $key);
88 88
 
89
-		throw ConfigException::notFound(implode(' » ', $path));
90
-	}
89
+        throw ConfigException::notFound(implode(' » ', $path));
90
+    }
91 91
 
92 92
     /**
93 93
      * Définir une configuration de l'application
94 94
      */
95 95
     public function set(string $key, $value)
96 96
     {
97
-       $this->configurator->set($key, $value);
97
+        $this->configurator->set($key, $value);
98 98
     }
99 99
 
100 100
     /**
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
                 $schema = self::schema($config);
133 133
             }
134 134
 
135
-			$this->configurator->addSchema($config, $schema, false);
136
-			$this->configurator->merge([$config => (array) $configurations]);
135
+            $this->configurator->addSchema($config, $schema, false);
136
+            $this->configurator->merge([$config => (array) $configurations]);
137 137
 
138 138
             self::$loaded[$config] = $file;
139 139
         }
@@ -163,17 +163,17 @@  discard block
 block discarded – undo
163 163
     {
164 164
         $path = preg_replace('#\.php$#', '', $path);
165 165
 
166
-		if (file_exists($file = CONFIG_PATH . $path . '.php')) {
167
-			return $file;
168
-		}
166
+        if (file_exists($file = CONFIG_PATH . $path . '.php')) {
167
+            return $file;
168
+        }
169 169
 
170
-		$paths = Services::locator()->search('Config/' . $path);
170
+        $paths = Services::locator()->search('Config/' . $path);
171 171
 
172
-		if (isset($paths[0]) && file_exists($path[0])) {
173
-			return $paths[0];
174
-		}
172
+        if (isset($paths[0]) && file_exists($path[0])) {
173
+            return $paths[0];
174
+        }
175 175
 		
176
-		return '';
176
+        return '';
177 177
     }
178 178
 
179 179
     /**
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
      */
204 204
     private function initialize()
205 205
     {
206
-		if (self::$initialized) {
207
-			return;
208
-		}
206
+        if (self::$initialized) {
207
+            return;
208
+        }
209 209
 		
210
-		$this->load(['app']);
210
+        $this->load(['app']);
211 211
         
212 212
         ini_set('log_errors', 1);
213 213
         ini_set('error_log', LOG_PATH . 'blitz-logs');
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $this->initializeEnvironment();
217 217
         $this->initializeDebugbar();
218 218
 
219
-		self::$initialized = true;
219
+        self::$initialized = true;
220 220
     }
221 221
 
222 222
     /**
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
 	public function exists(string $key): bool
45 45
 	{
46
-		if (! $this->configurator->exists($key)) {
46
+		if (!$this->configurator->exists($key)) {
47 47
 			$config = explode('.', $key);
48 48
         	$this->load($config[0]);
49 49
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
 	public function missing(string $key): bool
68 68
 	{
69
-		return ! $this->exists($key);
69
+		return !$this->exists($key);
70 70
 	}
71 71
 
72 72
     /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         if (is_array($config)) {
108 108
             foreach ($config as $key => $value) {
109
-                if (! is_string($value) || empty($value)) {
109
+                if (!is_string($value) || empty($value)) {
110 110
                     continue;
111 111
                 }
112 112
                 if (is_string($key)) {
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
                 }
119 119
                 self::load($conf, $file);
120 120
             }
121
-        } elseif (is_string($config) && ! isset(self::$loaded[$config])) {
121
+        } elseif (is_string($config) && !isset(self::$loaded[$config])) {
122 122
             if (empty($file)) {
123 123
                 $file = self::path($config);
124 124
             }
125 125
 
126 126
             $configurations = [];
127
-            if (file_exists($file) && ! in_array($file, get_included_files(), true)) {
127
+            if (file_exists($file) && !in_array($file, get_included_files(), true)) {
128 128
                 $configurations = (array) require $file;
129 129
             }
130 130
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     {
150 150
         if (is_array($accepts_values)) {
151 151
             $accepts_values = '(Accept values: ' . implode('/', $accepts_values) . ')';
152
-        } elseif (! is_string($accepts_values)) {
152
+        } elseif (!is_string($accepts_values)) {
153 153
             throw new InvalidArgumentException('Misuse of the method ' . __METHOD__);
154 154
         }
155 155
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             $schema = require $app_schema;
192 192
         }
193 193
 
194
-        if (empty($schema) || ! ($schema instanceof Schema)) {
194
+        if (empty($schema) || !($schema instanceof Schema)) {
195 195
             $schema = Expect::mixed();
196 196
         }
197 197
 
@@ -278,12 +278,12 @@  discard block
 block discarded – undo
278 278
     {
279 279
         $config = $this->get('app.show_debugbar', 'auto');
280 280
         
281
-        if (! in_array($config, ['auto', true, false], true)) {
281
+        if (!in_array($config, ['auto', true, false], true)) {
282 282
             self::exceptBadConfigValue('show_debugbar', ['auto', true, false], 'app');
283 283
         }
284 284
 
285 285
         if ($config === 'auto') {
286
-            $this->set('app.show_debugbar', ! is_online());
286
+            $this->set('app.show_debugbar', !is_online());
287 287
         }
288 288
     }
289 289
 }
Please login to merge, or discard this patch.
src/Helpers/common.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,18 +115,18 @@
 block discarded – undo
115 115
 }
116 116
 
117 117
 if (! function_exists('config')) {
118
-   /**
118
+    /**
119 119
      * GET/SET App config
120 120
      *
121 121
      * @return Config|mixed|void
122 122
      */
123 123
     function config(array|string|null $key = null, $default = null)
124 124
     {
125
-		$config = Services::config();
125
+        $config = Services::config();
126 126
 
127
-		if (null === $key) {
128
-			return $config;
129
-		}
127
+        if (null === $key) {
128
+            return $config;
129
+        }
130 130
 
131 131
         if (is_string($key)) {
132 132
             return $config->get($key, $default);
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
67 67
      *
68 68
      * @return T
69 69
      */
70
-    function model(string|array $name, ?ConnectionInterface &$conn = null)
70
+    function model(string|array $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
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 }
92 92
 
93
-if (! function_exists('single_service')) {
93
+if (!function_exists('single_service')) {
94 94
     /**
95 95
      * Autoriser l'accès propre à un service.
96 96
      * Renvoie toujours une nouvelle instance de la classe.
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     }
105 105
 }
106 106
 
107
-if (! function_exists('show404')) {
107
+if (!function_exists('show404')) {
108 108
     /**
109 109
      * Afficher une page 404 introuvable dans le navigateur
110 110
      */
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     }
115 115
 }
116 116
 
117
-if (! function_exists('config')) {
117
+if (!function_exists('config')) {
118 118
    /**
119 119
      * GET/SET App config
120 120
      *
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== //
144 144
 
145
-if (! function_exists('esc')) {
145
+if (!function_exists('esc')) {
146 146
     /**
147 147
      * Effectue un simple échappement automatique des données pour des raisons de sécurité.
148 148
      * Pourrait envisager de rendre cela plus complexe à une date ultérieure.
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     }
170 170
 }
171 171
 
172
-if (! function_exists('h')) {
172
+if (!function_exists('h')) {
173 173
     /**
174 174
      * Méthode pratique pour htmlspecialchars.
175 175
      *
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     }
189 189
 }
190 190
 
191
-if (! function_exists('purify')) {
191
+if (!function_exists('purify')) {
192 192
     /**
193 193
      * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier.
194 194
      * Utilisez facilement plusieurs configurations de purificateur.
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     }
207 207
 }
208 208
 
209
-if (! function_exists('remove_invisible_characters')) {
209
+if (!function_exists('remove_invisible_characters')) {
210 210
     /**
211 211
      * Supprimer les caractères invisibles
212 212
      *
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     }
220 220
 }
221 221
 
222
-if (! function_exists('stringify_attributes')) {
222
+if (!function_exists('stringify_attributes')) {
223 223
     /**
224 224
      * Chaîner les attributs à utiliser dans les balises HTML.
225 225
      *
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
 // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= //
235 235
 
236
-if (! function_exists('on_dev')) {
236
+if (!function_exists('on_dev')) {
237 237
     /**
238 238
      * Testez pour voir si nous sommes dans un environnement de développement.
239 239
      */
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     }
250 250
 }
251 251
 
252
-if (! function_exists('on_prod')) {
252
+if (!function_exists('on_prod')) {
253 253
     /**
254 254
      * Testez pour voir si nous sommes dans un environnement de production.
255 255
      */
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     }
266 266
 }
267 267
 
268
-if (! function_exists('on_test')) {
268
+if (!function_exists('on_test')) {
269 269
     /**
270 270
      * Testez pour voir si nous sommes dans un environnement de test
271 271
      */
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     }
278 278
 }
279 279
 
280
-if (! function_exists('is_cli')) {
280
+if (!function_exists('is_cli')) {
281 281
     /**
282 282
      * Testez pour voir si une demande a été faite à partir de la ligne de commande.
283 283
      */
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     }
288 288
 }
289 289
 
290
-if (! function_exists('is_php')) {
290
+if (!function_exists('is_php')) {
291 291
     /**
292 292
      * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie.
293 293
      */
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     }
298 298
 }
299 299
 
300
-if (! function_exists('is_windows')) {
300
+if (!function_exists('is_windows')) {
301 301
     /**
302 302
      * Déterminez si l'environnement actuel est basé sur Windows.
303 303
      */
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     }
308 308
 }
309 309
 
310
-if (! function_exists('is_https')) {
310
+if (!function_exists('is_https')) {
311 311
     /**
312 312
      * Determines if the application is accessed via an encrypted * (HTTPS) connection.
313 313
      */
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     }
318 318
 }
319 319
 
320
-if (! function_exists('is_localfile')) {
320
+if (!function_exists('is_localfile')) {
321 321
     /**
322 322
      * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non
323 323
      */
@@ -327,11 +327,11 @@  discard block
 block discarded – undo
327 327
             return true;
328 328
         }
329 329
 
330
-        return ! preg_match('#^(https?://)#i', $name);
330
+        return !preg_match('#^(https?://)#i', $name);
331 331
     }
332 332
 }
333 333
 
334
-if (! function_exists('is_online')) {
334
+if (!function_exists('is_online')) {
335 335
     /**
336 336
      * Tester si l'application s'exécute en local ou en ligne.
337 337
      */
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     }
342 342
 }
343 343
 
344
-if (! function_exists('is_connected')) {
344
+if (!function_exists('is_connected')) {
345 345
     /**
346 346
      * Verifie si l'utilisateur a une connexion internet active.
347 347
      */
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     }
352 352
 }
353 353
 
354
-if (! function_exists('is_ajax_request')) {
354
+if (!function_exists('is_ajax_request')) {
355 355
     /**
356 356
      * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH.
357 357
      */
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     }
362 362
 }
363 363
 
364
-if (! function_exists('redirection')) {
364
+if (!function_exists('redirection')) {
365 365
     /**
366 366
      * Redirige l'utilisateur
367 367
      */
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     }
376 376
 }
377 377
 
378
-if (! function_exists('redirect')) {
378
+if (!function_exists('redirect')) {
379 379
     /**
380 380
      * Méthode pratique qui fonctionne avec la $request globale actuelle et
381 381
      * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
     {
390 390
         $redirection = Services::redirection();
391 391
 
392
-        if (! empty($uri)) {
392
+        if (!empty($uri)) {
393 393
             return $redirection->route($uri);
394 394
         }
395 395
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     }
398 398
 }
399 399
 
400
-if (! function_exists('back')) {
400
+if (!function_exists('back')) {
401 401
     /**
402 402
      * Retourne a la page precedente
403 403
      */
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     }
408 408
 }
409 409
 
410
-if (! function_exists('link_to')) {
410
+if (!function_exists('link_to')) {
411 411
     /**
412 412
      * Étant donné une chaîne de contrôleur/méthode et tous les paramètres,
413 413
      * tentera de créer l'URL relative à la route correspondante.
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     }
428 428
 }
429 429
 
430
-if (! function_exists('clean_path')) {
430
+if (!function_exists('clean_path')) {
431 431
     /**
432 432
      * Une méthode pratique pour nettoyer les chemins pour
433 433
      * une sortie plus belle. Utile pour les exceptions
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
     }
460 460
 }
461 461
 
462
-if (! function_exists('old')) {
462
+if (!function_exists('old')) {
463 463
     /**
464 464
      * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput().
465 465
      *
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     function old(string $key, ?string $default = null, $escape = 'html')
472 472
     {
473 473
         // Assurez-vous de charger la session
474
-        if (session_status() === PHP_SESSION_NONE && ! on_test()) {
474
+        if (session_status() === PHP_SESSION_NONE && !on_test()) {
475 475
             session(); // @codeCoverageIgnore
476 476
         }
477 477
 
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 
487 487
 // ================================= FONCTIONS DE DEBOGAGE ================================= //
488 488
 
489
-if (! function_exists('dd')) {
489
+if (!function_exists('dd')) {
490 490
     /**
491 491
      * Prints a Kint debug report and exits.
492 492
      *
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     }
506 506
 }
507 507
 
508
-if (! function_exists('dump')) {
508
+if (!function_exists('dump')) {
509 509
     /**
510 510
      * Prints a Kint debug report and exits.
511 511
      *
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
     }
523 523
 }
524 524
 
525
-if (! function_exists('deprecationWarning')) {
525
+if (!function_exists('deprecationWarning')) {
526 526
     /**
527 527
      * Méthode d'assistance pour générer des avertissements d'obsolescence
528 528
      *
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
     }
539 539
 }
540 540
 
541
-if (! function_exists('logger')) {
541
+if (!function_exists('logger')) {
542 542
     /**
543 543
      * A convenience/compatibility method for logging events through
544 544
      * the Log system.
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
     {
562 562
         $logger = Services::logger();
563 563
 
564
-        if (! empty($level) && ! empty($message)) {
564
+        if (!empty($level) && !empty($message)) {
565 565
             return $logger->log($level, $message, $context);
566 566
         }
567 567
 
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
     }
570 570
 }
571 571
 
572
-if (! function_exists('cache')) {
572
+if (!function_exists('cache')) {
573 573
     /**
574 574
      * Une méthode pratique qui donne accès au cache
575 575
      * objet. Si aucun paramètre n'est fourni, renverra l'objet,
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     }
600 600
 }
601 601
 
602
-if (! function_exists('session')) {
602
+if (!function_exists('session')) {
603 603
     /**
604 604
      * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session.
605 605
      *
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
     }
623 623
 }
624 624
 
625
-if (! function_exists('pr')) {
625
+if (!function_exists('pr')) {
626 626
     /**
627 627
      * print_r() convenience function.
628 628
      *
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
     }
645 645
 }
646 646
 
647
-if (! function_exists('pj')) {
647
+if (!function_exists('pj')) {
648 648
     /**
649 649
      * json pretty print convenience function.
650 650
      *
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
     }
666 666
 }
667 667
 
668
-if (! function_exists('trigger_warning')) {
668
+if (!function_exists('trigger_warning')) {
669 669
     /**
670 670
      * Déclenche un E_USER_WARNING.
671 671
      */
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
     }
676 676
 }
677 677
 
678
-if (! function_exists('vd')) {
678
+if (!function_exists('vd')) {
679 679
     /**
680 680
      * Shortcut to ref, HTML mode
681 681
      *
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
     }
688 688
 }
689 689
 
690
-if (! function_exists('vdt')) {
690
+if (!function_exists('vdt')) {
691 691
     /**
692 692
      * Shortcut to ref, plain text mode
693 693
      *
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 
702 702
 // ================================= FONCTIONS DIVERSES ================================= //
703 703
 
704
-if (! function_exists('force_https')) {
704
+if (!function_exists('force_https')) {
705 705
     /**
706 706
      * Utilisé pour forcer l'accès à une page via HTTPS.
707 707
      * Utilise une redirection standard, plus définira l'en-tête HSTS
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
     }
760 760
 }
761 761
 
762
-if (! function_exists('getTypeName')) {
762
+if (!function_exists('getTypeName')) {
763 763
     /**
764 764
      * Renvoie la classe d'objets ou le type var de ce n'est pas un objet
765 765
      *
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
     }
774 774
 }
775 775
 
776
-if (! function_exists('ip_address')) {
776
+if (!function_exists('ip_address')) {
777 777
     /**
778 778
      * Renvoie l'adresse IP de l'utilisateur actuel
779 779
      */
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
     }
784 784
 }
785 785
 
786
-if (! function_exists('is_really_writable')) {
786
+if (!function_exists('is_really_writable')) {
787 787
     /**
788 788
      * Tests d'inscriptibilité des fichiers
789 789
      */
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
     }
794 794
 }
795 795
 
796
-if (! function_exists('lang')) {
796
+if (!function_exists('lang')) {
797 797
     /**
798 798
      * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater
799 799
      * le résultat avec le MessageFormatter de l'extension intl.
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
     }
805 805
 }
806 806
 
807
-if (! function_exists('__')) {
807
+if (!function_exists('__')) {
808 808
     /**
809 809
      * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater
810 810
      * le résultat avec le MessageFormatter de l'extension intl.
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
     }
818 818
 }
819 819
 
820
-if (! function_exists('namespace_split')) {
820
+if (!function_exists('namespace_split')) {
821 821
     /**
822 822
      * Séparez l'espace de noms du nom de classe.
823 823
      *
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
     }
839 839
 }
840 840
 
841
-if (! function_exists('view_exist')) {
841
+if (!function_exists('view_exist')) {
842 842
     /**
843 843
      * Verifie si un fichier de vue existe. Utile pour limiter les failles include
844 844
      */
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
     }
853 853
 }
854 854
 
855
-if (! function_exists('view')) {
855
+if (!function_exists('view')) {
856 856
     /**
857 857
      * Charge une vue
858 858
      *
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
     }
869 869
 }
870 870
 
871
-if (! function_exists('flash')) {
871
+if (!function_exists('flash')) {
872 872
     /**
873 873
      * Fournisseur d'acces rapide a la classe PHP Flash
874 874
      *
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
     }*/
901 901
 }
902 902
 
903
-if (! function_exists('geo_ip')) {
903
+if (!function_exists('geo_ip')) {
904 904
     /**
905 905
      * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip
906 906
      */
@@ -910,7 +910,7 @@  discard block
 block discarded – undo
910 910
     }
911 911
 }
912 912
 
913
-if (! function_exists('to_stream')) {
913
+if (!function_exists('to_stream')) {
914 914
     /**
915 915
      * Créez un nouveau flux basé sur le type d'entrée.
916 916
      *
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
     }
934 934
 }
935 935
 
936
-if (! function_exists('value')) {
936
+if (!function_exists('value')) {
937 937
     /**
938 938
      * Renvoie la valeur par défaut de la valeur donnée.
939 939
      */
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
     }
944 944
 }
945 945
 
946
-if (! function_exists('collect')) {
946
+if (!function_exists('collect')) {
947 947
     /**
948 948
      * Créez une collection à partir de la valeur donnée.
949 949
      */
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
     }
954 954
 }
955 955
 
956
-if (! function_exists('with')) {
956
+if (!function_exists('with')) {
957 957
     /**
958 958
      * Renvoie la valeur donnée, éventuellement transmise via le rappel donné.
959 959
      *
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
     }
966 966
 }
967 967
 
968
-if (! function_exists('tap')) {
968
+if (!function_exists('tap')) {
969 969
     /**
970 970
      * Appelez la Closure donnée avec cette instance puis renvoyez l'instance.
971 971
      */
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
     }
976 976
 }
977 977
 
978
-if (! function_exists('last')) {
978
+if (!function_exists('last')) {
979 979
     /**
980 980
      * Recupere le dernier element d'un tableau
981 981
      */
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     }
986 986
 }
987 987
 
988
-if (! function_exists('invade')) {
988
+if (!function_exists('invade')) {
989 989
     /**
990 990
      * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet.
991 991
      * Il vous permettra également de définir, obtenir et appeler des méthodes privées.
Please login to merge, or discard this patch.
src/Helpers/assets.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * the LICENSE file that was distributed with this source code.
10 10
  */
11 11
 
12
-if (! function_exists('css_url')) {
12
+if (!function_exists('css_url')) {
13 13
     /**
14 14
      * CSS URL
15 15
      *
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
         $name = str_replace(site_url() . 'css/', '', htmlspecialchars($name));
24 24
 
25 25
         if (is_localfile($name)) {
26
-            $name .= (! preg_match('#\.css$#i', $name) ? '.css' : '');
26
+            $name .= (!preg_match('#\.css$#i', $name) ? '.css' : '');
27 27
             $filename = WEBROOT . 'css' . DS . $name;
28 28
 
29 29
             return site_url() . 'css/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');
30 30
         }
31 31
 
32
-        return $name . (! preg_match('#\.css$#i', $name) ? '.css' : '');
32
+        return $name . (!preg_match('#\.css$#i', $name) ? '.css' : '');
33 33
     }
34 34
 }
35 35
 
36
-if (! function_exists('js_url')) {
36
+if (!function_exists('js_url')) {
37 37
     /**
38 38
      * JS URL
39 39
      *
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
         $name = str_replace(site_url() . 'js/', '', htmlspecialchars($name));
48 48
 
49 49
         if (is_localfile($name)) {
50
-            $name .= (! preg_match('#\.js$#i', $name) ? '.js' : '');
50
+            $name .= (!preg_match('#\.js$#i', $name) ? '.js' : '');
51 51
             $filename = WEBROOT . 'js' . DS . $name;
52 52
 
53 53
             return site_url() . 'js/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');
54 54
         }
55 55
 
56
-        return $name . (! preg_match('#\.js$#i', $name) ? '.js' : '');
56
+        return $name . (!preg_match('#\.js$#i', $name) ? '.js' : '');
57 57
     }
58 58
 }
59 59
 
60
-if (! function_exists('lib_css_url')) {
60
+if (!function_exists('lib_css_url')) {
61 61
     /**
62 62
      * LIB CSS URL
63 63
      *
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
         $name = str_replace(site_url() . 'lib/', '', htmlspecialchars($name));
72 72
 
73 73
         if (is_localfile($name)) {
74
-            $name .= (! preg_match('#\.css$#i', $name) ? '.css' : '');
74
+            $name .= (!preg_match('#\.css$#i', $name) ? '.css' : '');
75 75
             $filename = WEBROOT . 'lib' . DS . $name;
76 76
 
77 77
             return site_url() . 'lib/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');
78 78
         }
79 79
 
80
-        return $name . (! preg_match('#\.css$#i', $name) ? '.css' : '');
80
+        return $name . (!preg_match('#\.css$#i', $name) ? '.css' : '');
81 81
     }
82 82
 }
83 83
 
84
-if (! function_exists('lib_js_url')) {
84
+if (!function_exists('lib_js_url')) {
85 85
     /**
86 86
      * LIB JS URL
87 87
      *
@@ -95,17 +95,17 @@  discard block
 block discarded – undo
95 95
         $name = str_replace(site_url() . 'lib/', '', htmlspecialchars($name));
96 96
 
97 97
         if (is_localfile($name)) {
98
-            $name .= (! preg_match('#\.js$#i', $name) ? '.js' : '');
98
+            $name .= (!preg_match('#\.js$#i', $name) ? '.js' : '');
99 99
             $filename = WEBROOT . 'lib' . DS . $name;
100 100
 
101 101
             return site_url() . 'lib/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');
102 102
         }
103 103
 
104
-        return $name . (! preg_match('#\.js$#i', $name) ? '.js' : '');
104
+        return $name . (!preg_match('#\.js$#i', $name) ? '.js' : '');
105 105
     }
106 106
 }
107 107
 
108
-if (! function_exists('lib_styles')) {
108
+if (!function_exists('lib_styles')) {
109 109
     /**
110 110
      * LIB_STYLES
111 111
      *
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         foreach ($name as $style) {
125 125
             if (is_string($style)) {
126
-                $style = (! preg_match('#\.css$#i', $style) ? $style . '.css' : $style);
126
+                $style = (!preg_match('#\.css$#i', $style) ? $style . '.css' : $style);
127 127
                 if (is_file(WEBROOT . 'lib' . DS . str_replace('/', DS, $style))) {
128 128
                     $return[] = '<link rel="preload" type="text/css" href="' . lib_css_url($style) . '" as="style">
129 129
 						<link rel="stylesheet" type="text/css" href="' . lib_css_url($style) . '" />';
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     }
148 148
 }
149 149
 
150
-if (! function_exists('lib_scripts')) {
150
+if (!function_exists('lib_scripts')) {
151 151
     /**
152 152
      * LIB_SCRIPTS
153 153
      *
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         foreach ($name as $script) {
167 167
             if (is_string($script)) {
168
-                $script = (! preg_match('#\.js$#i', $script) ? $script . '.js' : $script);
168
+                $script = (!preg_match('#\.js$#i', $script) ? $script . '.js' : $script);
169 169
                 if (is_file(WEBROOT . 'lib' . DS . str_replace('/', DS, $script))) {
170 170
                     $return[] = '<script type="text/javascript" src="' . lib_js_url($script) . '"></script>';
171 171
                 } elseif (is_localfile($script)) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     }
188 188
 }
189 189
 
190
-if (! function_exists('styles')) {
190
+if (!function_exists('styles')) {
191 191
     /**
192 192
      * STYLES
193 193
      *
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         foreach ($name as $style) {
207 207
             if (is_string($style)) {
208
-                $style = (! preg_match('#\.css$#i', $style) ? $style . '.css' : $style);
208
+                $style = (!preg_match('#\.css$#i', $style) ? $style . '.css' : $style);
209 209
                 if (is_file(WEBROOT . 'css' . DS . str_replace('/', DS, $style))) {
210 210
                     $return[] = '<link rel="preload" type="text/css" href="' . css_url($style) . '" as="style">
211 211
 						<link rel="stylesheet" type="text/css" href="' . css_url($style) . '" />';
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     }
230 230
 }
231 231
 
232
-if (! function_exists('scripts')) {
232
+if (!function_exists('scripts')) {
233 233
     /**
234 234
      * SCRIPTS
235 235
      *
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
         foreach ($name as $script) {
249 249
             if (is_string($script)) {
250
-                $script = (! preg_match('#\.js$#i', $script) ? $script . '.js' : $script);
250
+                $script = (!preg_match('#\.js$#i', $script) ? $script . '.js' : $script);
251 251
                 if (is_file(WEBROOT . 'js' . DS . str_replace('/', DS, $script))) {
252 252
                     $return[] = '<script type="text/javascript" src="' . js_url($script) . '"></script>';
253 253
                 } elseif (is_localfile($script)) {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     }
270 270
 }
271 271
 
272
-if (! function_exists('less_url')) {
272
+if (!function_exists('less_url')) {
273 273
     /**
274 274
      * LESS URL
275 275
      *
@@ -283,17 +283,17 @@  discard block
 block discarded – undo
283 283
         $name = str_replace(site_url() . 'less/', '', htmlspecialchars($name));
284 284
 
285 285
         if (is_localfile($name)) {
286
-            $name .= (! preg_match('#\.less$#i', $name) ? '.less' : '');
286
+            $name .= (!preg_match('#\.less$#i', $name) ? '.less' : '');
287 287
             $filename = WEBROOT . 'less' . DS . $name;
288 288
 
289 289
             return site_url() . 'less/' . $name . ((file_exists($filename)) ? '?v=' . filemtime($filename) : '');
290 290
         }
291 291
 
292
-        return $name . (! preg_match('#\.less$#i', $name) ? '.less' : '');
292
+        return $name . (!preg_match('#\.less$#i', $name) ? '.less' : '');
293 293
     }
294 294
 }
295 295
 
296
-if (! function_exists('less_styles')) {
296
+if (!function_exists('less_styles')) {
297 297
     /**
298 298
      * LESS_STYLES
299 299
      *
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
         foreach ($name as $style) {
313 313
             if (is_string($style)) {
314
-                $style = (! preg_match('#\.less$#i', $style) ? $style . '.less' : $style);
314
+                $style = (!preg_match('#\.less$#i', $style) ? $style . '.less' : $style);
315 315
                 if (is_file(WEBROOT . 'less' . DS . str_replace('/', DS, $style))) {
316 316
                     $return[] = '<link rel="stylesheet" type="text/less" href="' . less_url($style) . '" />';
317 317
                 } elseif (is_localfile($style)) {
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
     }
334 334
 }
335 335
 
336
-if (! function_exists('img_url')) {
336
+if (!function_exists('img_url')) {
337 337
     /**
338 338
      * IMG URL
339 339
      *
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     }
361 361
 }
362 362
 
363
-if (! function_exists('img')) {
363
+if (!function_exists('img')) {
364 364
     /**
365 365
      * IMG
366 366
      *
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
     }
392 392
 }
393 393
 
394
-if (! function_exists('docs_url')) {
394
+if (!function_exists('docs_url')) {
395 395
     /**
396 396
      * DOCS URL
397 397
      *
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
     }
419 419
 }
420 420
 
421
-if (! function_exists('videos_url')) {
421
+if (!function_exists('videos_url')) {
422 422
     /**
423 423
      * VIDEOS URL
424 424
      *
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
     }
446 446
 }
447 447
 
448
-if (! function_exists('mix')) {
448
+if (!function_exists('mix')) {
449 449
     /**
450 450
      * Obtenez le chemin d'accès à un fichier Mix versionné.
451 451
      *
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
         if (!isset($manifest[$path])) {
497 497
             $exception = new Exception("Impossible de localiser le fichier Mix: {$path}.");
498 498
 
499
-            if (! BLITZ_DEBUG) {
499
+            if (!BLITZ_DEBUG) {
500 500
                 return $path;
501 501
             } else {
502 502
                 throw $exception;
Please login to merge, or discard this patch.
src/Loader/FileLocator.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
     }
107 107
 
108
-	/**
108
+    /**
109 109
      * Charge un fichier d'aide en mémoire.
110 110
      * Prend en charge les helpers d'espace de noms, à la fois dans et hors du répertoire 'helpers' d'un répertoire d'espace de noms.
111 111
      */
@@ -115,53 +115,53 @@  discard block
 block discarded – undo
115 115
 
116 116
         $loader = Services::locator();
117 117
 
118
-		// Stockez nos versions de schame système et d'application afin que nous puissions contrôler l'ordre de chargement.
119
-		$systemSchema  = null;
120
-		$appSchema     = null;
121
-		$vendorSchema  = null;
118
+        // Stockez nos versions de schame système et d'application afin que nous puissions contrôler l'ordre de chargement.
119
+        $systemSchema  = null;
120
+        $appSchema     = null;
121
+        $vendorSchema  = null;
122 122
 		
123
-		// Le fichier de schema qui sera finalement utiliser
124
-		$file = null;
123
+        // Le fichier de schema qui sera finalement utiliser
124
+        $file = null;
125 125
 		
126
-		// Vérifiez si ce schama a déjà été chargé
127
-		if (in_array($name, $loadedSchema, true)) {
126
+        // Vérifiez si ce schama a déjà été chargé
127
+        if (in_array($name, $loadedSchema, true)) {
128 128
             return $loadedSchema[$name];
129
-		}
130
-
131
-		// Si le fichier est dans un espace de noms, nous allons simplement saisir ce fichier et ne pas en rechercher d'autres
132
-		if (strpos($name, '\\') !== false) {
133
-			if (!empty($path = $loader->locateFile($name, 'schemas'))) {
134
-				$file = $path;
135
-			}
136
-		} else {
137
-			// Pas d'espaces de noms, donc recherchez dans tous les emplacements disponibles
138
-			$paths = $loader->search('schemas/' . $name);
139
-
140
-			foreach ($paths as $path) {
141
-				if (strpos($path, CONFIG_PATH . 'schemas' . DS) === 0) {
142
-					$appSchema = $path;
143
-				} elseif (strpos($path, SYST_PATH . 'Constants' . DS . 'schemas' . DS) === 0) {
144
-					$systemSchema = $path;
145
-				} else {
146
-					$vendorSchema = $path;
147
-				}
148
-			}
149
-
150
-			// Les schema des vendor sont prioritaire, ensuite vienne ceux de l'application
151
-			if (!empty($vendorSchema)) {
152
-				$file = $vendorSchema;
153
-			} else if (!empty($appSchema)) {
154
-				$file = $appSchema;
155
-			} else if (!empty($systemSchema)) {
156
-				$file = $systemSchema;
157
-			}
158 129
         }
159 130
 
160
-		if (!empty($file)) {
161
-			$schema = require($file);
162
-		} else {
163
-			$schema = null;
164
-		}
131
+        // Si le fichier est dans un espace de noms, nous allons simplement saisir ce fichier et ne pas en rechercher d'autres
132
+        if (strpos($name, '\\') !== false) {
133
+            if (!empty($path = $loader->locateFile($name, 'schemas'))) {
134
+                $file = $path;
135
+            }
136
+        } else {
137
+            // Pas d'espaces de noms, donc recherchez dans tous les emplacements disponibles
138
+            $paths = $loader->search('schemas/' . $name);
139
+
140
+            foreach ($paths as $path) {
141
+                if (strpos($path, CONFIG_PATH . 'schemas' . DS) === 0) {
142
+                    $appSchema = $path;
143
+                } elseif (strpos($path, SYST_PATH . 'Constants' . DS . 'schemas' . DS) === 0) {
144
+                    $systemSchema = $path;
145
+                } else {
146
+                    $vendorSchema = $path;
147
+                }
148
+            }
149
+
150
+            // Les schema des vendor sont prioritaire, ensuite vienne ceux de l'application
151
+            if (!empty($vendorSchema)) {
152
+                $file = $vendorSchema;
153
+            } else if (!empty($appSchema)) {
154
+                $file = $appSchema;
155
+            } else if (!empty($systemSchema)) {
156
+                $file = $systemSchema;
157
+            }
158
+        }
159
+
160
+        if (!empty($file)) {
161
+            $schema = require($file);
162
+        } else {
163
+            $schema = null;
164
+        }
165 165
 
166 166
         if (empty($schema) || ! ($schema instanceof Schema)) {
167 167
             $schema = Expect::mixed();
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $loader = Services::locator();
41 41
 
42
-        if (! is_array($filenames)) {
42
+        if (!is_array($filenames)) {
43 43
             $filenames = [$filenames];
44 44
         }
45 45
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 }
84 84
 
85 85
                 // Les helpers au niveau de l'application doivent remplacer tous les autres
86
-                if (! empty($appHelper)) {
86
+                if (!empty($appHelper)) {
87 87
                     $includes[] = $appHelper;
88 88
                     $loaded[]   = $filename;
89 89
                 }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 $includes = [...$includes, ...$localIncludes];
93 93
 
94 94
                 // Et celui par défaut du système doit être ajouté en dernier.
95
-                if (! empty($systemHelper)) {
95
+                if (!empty($systemHelper)) {
96 96
                     $includes[] = $systemHelper;
97 97
                     $loaded[]   = $filename;
98 98
                 }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			$schema = null;
164 164
 		}
165 165
 
166
-        if (empty($schema) || ! ($schema instanceof Schema)) {
166
+        if (empty($schema) || !($schema instanceof Schema)) {
167 167
             $schema = Expect::mixed();
168 168
         }
169 169
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             throw LoadException::libraryNotFound($lib);
204 204
         }
205 205
 
206
-        if (true !== $file_syst && ! class_exists($lib)) {
206
+        if (true !== $file_syst && !class_exists($lib)) {
207 207
             throw LoadException::libraryDontExist($lib);
208 208
         }
209 209
 
@@ -221,16 +221,16 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public static function model(string $model, ?ConnectionInterface $connection = null)
223 223
     {
224
-        if (! class_exists($model) && ! Text::endsWith($model, 'Model')) {
224
+        if (!class_exists($model) && !Text::endsWith($model, 'Model')) {
225 225
             $model .= 'Model';
226 226
         }
227 227
 
228
-        if (! class_exists($model)) {
228
+        if (!class_exists($model)) {
229 229
             $model = str_replace(APP_NAMESPACE . '\\Models\\', '', $model);
230 230
             $model = APP_NAMESPACE . '\\Models\\' . $model;
231 231
         }
232 232
 
233
-        if (! class_exists($model)) {
233
+        if (!class_exists($model)) {
234 234
             throw LoadException::modelNotFound($model);
235 235
         }
236 236
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $controller = explode('/', $controller);
249 249
 
250 250
         $con                                = ucfirst(end($controller));
251
-        $con                                = (! preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con;
251
+        $con                                = (!preg_match('#Controller$#', $con)) ? $con . 'Controller' : $con;
252 252
         $controller[count($controller) - 1] = $con;
253 253
 
254 254
         foreach ($controller as $key => &$value) {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
         $path = CONTROLLER_PATH . Helpers::ensureExt(implode(DS, $controller), 'php');
261 261
 
262
-        if (! file_exists($path)) {
262
+        if (!file_exists($path)) {
263 263
             throw LoadException::controllerNotFound(str_replace('Controller', '', $con), $path);
264 264
         }
265 265
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         if (class_exists($class_namespaced, false)) {
271 271
             return Injector::make($class_namespaced);
272 272
         }
273
-        if (! class_exists($con, false)) {
273
+        if (!class_exists($con, false)) {
274 274
             throw LoadException::controllerDontExist(str_replace('Controller', '', $con), $path);
275 275
         }
276 276
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     protected static function verifyPreferApp(array $options, string $name): bool
300 300
     {
301 301
         // Tout element sans restriction passe
302
-        if (! $options['preferApp']) {
302
+        if (!$options['preferApp']) {
303 303
             return true;
304 304
         }
305 305
 
Please login to merge, or discard this patch.
src/View/Adapters/AbstractAdapter.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
             $file = $this->locator->locateFile($view, 'Views', empty($ext) ? 'php' : $ext);
234 234
         }
235 235
 		
236
-		$file = realpath($file);
236
+        $file = realpath($file);
237 237
 		
238 238
         // locateFile renverra une chaîne vide si le fichier est introuvable.
239 239
         if (! is_file($file)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         helper('assets');
72 72
 
73
-        if (! empty($viewPathLocator)) {
73
+        if (!empty($viewPathLocator)) {
74 74
             if (is_string($viewPathLocator)) {
75 75
                 $this->viewPath = rtrim($viewPathLocator, '\\/ ') . DS;
76 76
             } elseif ($viewPathLocator instanceof Locator) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $options = (array) $options;
222 222
 
223 223
         $viewPath = $options['viewPath'] ?? $this->viewPath;
224
-        if (! empty($viewPath)) {
224
+        if (!empty($viewPath)) {
225 225
             $file = str_replace('/', DS, rtrim($viewPath, '/\\') . DS . ltrim($view, '/\\'));
226 226
         } else {
227 227
             $file = $view;
@@ -229,14 +229,14 @@  discard block
 block discarded – undo
229 229
 
230 230
         $file = Helpers::ensureExt($file, $ext);
231 231
 
232
-        if (! is_file($file) && $this->locator instanceof Locator) {
232
+        if (!is_file($file) && $this->locator instanceof Locator) {
233 233
             $file = $this->locator->locateFile($view, 'Views', empty($ext) ? 'php' : $ext);
234 234
         }
235 235
 		
236 236
 		$file = realpath($file);
237 237
 		
238 238
         // locateFile renverra une chaîne vide si le fichier est introuvable.
239
-        if (! is_file($file)) {
239
+        if (!is_file($file)) {
240 240
             throw ViewException::invalidFile($view);
241 241
         }
242 242
 
Please login to merge, or discard this patch.
src/Http/UrlGenerator.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  */
26 26
 class UrlGenerator 
27 27
 {
28
-	use Macroable;
28
+    use Macroable;
29 29
 
30 30
     /**
31 31
      * The forced URL root.
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function __construct(protected RouteCollectionInterface $routes, protected Request $request, protected ?string $assetRoot = null)
92 92
     {
93
-		$this->setRequest($request);
93
+        $this->setRequest($request);
94 94
     }
95 95
 
96 96
     /**
@@ -241,18 +241,18 @@  discard block
 block discarded – undo
241 241
 
242 242
     /**
243 243
      * Get the URL to a named route.
244
-	 * 
244
+     * 
245 245
      * @return string|false
246 246
      */
247 247
     public function route(string $name, array $parameters = [], bool $absolute = true)
248 248
     {
249
-		$route = $this->routes->reverseRoute($name, ...$parameters);
249
+        $route = $this->routes->reverseRoute($name, ...$parameters);
250 250
 
251 251
         if (! $route) {
252 252
             throw HttpException::invalidRedirectRoute($route);
253 253
         }
254 254
 
255
-		return $absolute ? site_url($route) : $route;
255
+        return $absolute ? site_url($route) : $route;
256 256
     }
257 257
 	
258 258
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         $this->cachedRoot = null;
411 411
         $this->cachedScheme = null;
412 412
 
413
-		return $this;
413
+        return $this;
414 414
     }
415 415
 
416 416
     /**
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
             return call_user_func($this->sessionResolver);
433 433
         }
434 434
 
435
-		return Services::session();
435
+        return Services::session();
436 436
     }
437 437
 
438 438
     /**
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         [$path, $query] = $this->extractQueryString($path);
164 164
 
165 165
         return $this->format(
166
-            $root, '/'.trim($path.'/'.$tail, '/')
167
-        ).$query;
166
+            $root, '/' . trim($path . '/' . $tail, '/')
167
+        ) . $query;
168 168
     }
169 169
 
170 170
     /**
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         // for asset paths, but only for routes to endpoints in the application.
190 190
         $root = $this->assetRoot ?: $this->formatRoot($this->formatScheme($secure));
191 191
 
192
-        return $this->removeIndex($root).'/'.trim($path, '/');
192
+        return $this->removeIndex($root) . '/' . trim($path, '/');
193 193
     }
194 194
 
195 195
     /**
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         // for asset paths, but only for routes to endpoints in the application.
211 211
         $root = $this->formatRoot($this->formatScheme($secure), $root);
212 212
 
213
-        return $this->removeIndex($root).'/'.trim($path, '/');
213
+        return $this->removeIndex($root) . '/' . trim($path, '/');
214 214
     }
215 215
 
216 216
     /**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     {
221 221
         $i = 'index.php';
222 222
 
223
-        return Text::contains($root, $i) ? str_replace('/'.$i, '', $root) : $root;
223
+        return Text::contains($root, $i) ? str_replace('/' . $i, '', $root) : $root;
224 224
     }
225 225
 
226 226
     /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         }
234 234
 
235 235
         if (null === $this->cachedScheme) {
236
-            $this->cachedScheme = $this->forceScheme ?: $this->request->getScheme().'://';
236
+            $this->cachedScheme = $this->forceScheme ?: $this->request->getScheme() . '://';
237 237
         }
238 238
 
239 239
         return $this->cachedScheme;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     {
249 249
 		$route = $this->routes->reverseRoute($name, ...$parameters);
250 250
 
251
-        if (! $route) {
251
+        if (!$route) {
252 252
             throw HttpException::invalidRedirectRoute($route);
253 253
         }
254 254
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
         $start = Text::startsWith($root, 'http://') ? 'http://' : 'https://';
298 298
 
299
-        return preg_replace('~'.$start.'~', $scheme, $root, 1);
299
+        return preg_replace('~' . $start . '~', $scheme, $root, 1);
300 300
     }
301 301
 
302 302
     /**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
      */
310 310
     public function format($root, $path, $route = null)
311 311
     {
312
-        $path = '/'.trim($path, '/');
312
+        $path = '/' . trim($path, '/');
313 313
 
314 314
         if ($this->formatHostUsing) {
315 315
             $root = call_user_func($this->formatHostUsing, $root, $route);
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             $path = call_user_func($this->formatPathUsing, $path, $route);
320 320
         }
321 321
 
322
-        return trim($root.$path, '/');
322
+        return trim($root . $path, '/');
323 323
     }
324 324
 
325 325
     /**
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function isValidUrl(string $path): bool
329 329
     {
330
-        if (! preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
330
+        if (!preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
331 331
             return filter_var($path, FILTER_VALIDATE_URL) !== false;
332 332
         }
333 333
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $this->cachedScheme = null;
343 343
 
344
-        $this->forceScheme = $scheme ? $scheme.'://' : null;
344
+        $this->forceScheme = $scheme ? $scheme . '://' : null;
345 345
     }
346 346
 
347 347
     /**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      */
388 388
     public function pathFormatter()
389 389
     {
390
-        return $this->formatPathUsing ?: function ($path) {
390
+        return $this->formatPathUsing ?: function($path) {
391 391
             return $path;
392 392
         };
393 393
     }
Please login to merge, or discard this patch.
src/Http/Redirection.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $request = $this->generator->getRequest();
118 118
 
119
-        $intended = $request->method() === 'GET' && ! $request->expectsJson()
119
+        $intended = $request->method() === 'GET' && !$request->expectsJson()
120 120
                         ? $this->generator->full()
121 121
                         : $this->generator->previous();
122 122
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             $errors = [$errors];
171 171
         }
172 172
 
173
-        if (! empty($errors)) {
173
+        if (!empty($errors)) {
174 174
             $_errors = $this->session->getFlashdata('errors') ?? [];
175 175
             $this->session->setFlashdata(
176 176
                 'errors',
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         try {
47 47
             return $this->to($this->generator->route('home'), $status);
48
-        }
49
-        catch (HttpException) {
48
+        } catch (HttpException) {
50 49
             return $this->to('/', $status);
51 50
         }
52 51
     }
Please login to merge, or discard this patch.