@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function validation(array|string $rules, array $messages = []): Validation |
57 | 57 | { |
58 | 58 | if (is_string($rules)) { |
59 | - if (! class_exists($rules) || ! is_subclass_of($rules, DataValidation::class)) { |
|
59 | + if (!class_exists($rules) || !is_subclass_of($rules, DataValidation::class)) { |
|
60 | 60 | throw new InvalidArgumentException(); |
61 | 61 | } |
62 | 62 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function fullUrl(): string |
143 | 143 | { |
144 | - if (! empty($query = $this->getEnv('QUERY_STRING'))) { |
|
144 | + if (!empty($query = $this->getEnv('QUERY_STRING'))) { |
|
145 | 145 | return $this->url() . '?' . $query; |
146 | 146 | } |
147 | 147 |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $this->cookies = $config['cookies']; |
235 | 235 | |
236 | 236 | if (isset($config['uri'])) { |
237 | - if (! $config['uri'] instanceof UriInterface) { |
|
237 | + if (!$config['uri'] instanceof UriInterface) { |
|
238 | 238 | throw new FrameworkException('The `uri` key must be an instance of ' . UriInterface::class); |
239 | 239 | } |
240 | 240 | $uri = $config['uri']; |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | $type = strtolower($type); |
440 | - if (! isset(static::$_detectors[$type])) { |
|
440 | + if (!isset(static::$_detectors[$type])) { |
|
441 | 441 | return false; |
442 | 442 | } |
443 | 443 | if ($args) { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | public function isAll(array $types): bool |
590 | 590 | { |
591 | 591 | foreach ($types as $type) { |
592 | - if (! $this->is($type)) { |
|
592 | + if (!$this->is($type)) { |
|
593 | 593 | return false; |
594 | 594 | } |
595 | 595 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | protected function normalizeHeaderName(string $name): string |
694 | 694 | { |
695 | 695 | $name = str_replace('-', '_', strtoupper($name)); |
696 | - if (! in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
696 | + if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) { |
|
697 | 697 | $name = 'HTTP_' . $name; |
698 | 698 | } |
699 | 699 | |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | { |
872 | 872 | $new = clone $this; |
873 | 873 | |
874 | - if (! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) { |
|
874 | + if (!preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)) { |
|
875 | 875 | throw new InvalidArgumentException(sprintf( |
876 | 876 | 'Méthode HTTP non prise en charge "%s" fournie', |
877 | 877 | $method |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | } |
1134 | 1134 | } |
1135 | 1135 | |
1136 | - if (! isset($accept[$prefValue])) { |
|
1136 | + if (!isset($accept[$prefValue])) { |
|
1137 | 1137 | $accept[$prefValue] = []; |
1138 | 1138 | } |
1139 | 1139 | if ($prefValue) { |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | if ($name === null) { |
1212 | 1212 | return $this->data; |
1213 | 1213 | } |
1214 | - if (! is_array($this->data)) { |
|
1214 | + if (!is_array($this->data)) { |
|
1215 | 1215 | return $default; |
1216 | 1216 | } |
1217 | 1217 | |
@@ -1351,7 +1351,7 @@ discard block |
||
1351 | 1351 | */ |
1352 | 1352 | public function withProtocolVersion(string $version): static |
1353 | 1353 | { |
1354 | - if (! preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) { |
|
1354 | + if (!preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) { |
|
1355 | 1355 | throw new InvalidArgumentException(sprintf('Version de protocole `%s` non prise en charge fournie.', $version)); |
1356 | 1356 | } |
1357 | 1357 | $new = clone $this; |
@@ -1373,7 +1373,7 @@ discard block |
||
1373 | 1373 | public function getEnv(string $key, ?string $default = null): ?string |
1374 | 1374 | { |
1375 | 1375 | $key = strtoupper($key); |
1376 | - if (! array_key_exists($key, $this->_environment) || null === $this->_environment[$key]) { |
|
1376 | + if (!array_key_exists($key, $this->_environment) || null === $this->_environment[$key]) { |
|
1377 | 1377 | $this->_environment[$key] = env($key, $default); |
1378 | 1378 | } |
1379 | 1379 | |
@@ -1590,7 +1590,7 @@ discard block |
||
1590 | 1590 | $file = Arr::get($this->uploadedFiles, $path); |
1591 | 1591 | if (is_array($file)) { |
1592 | 1592 | foreach ($file as $f) { |
1593 | - if (! ($f instanceof UploadedFile)) { |
|
1593 | + if (!($f instanceof UploadedFile)) { |
|
1594 | 1594 | return null; |
1595 | 1595 | } |
1596 | 1596 | } |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | return $file; |
1599 | 1599 | } |
1600 | 1600 | |
1601 | - if (! ($file instanceof UploadedFileInterface)) { |
|
1601 | + if (!($file instanceof UploadedFileInterface)) { |
|
1602 | 1602 | return null; |
1603 | 1603 | } |
1604 | 1604 | |
@@ -1646,7 +1646,7 @@ discard block |
||
1646 | 1646 | continue; |
1647 | 1647 | } |
1648 | 1648 | |
1649 | - if (! $file instanceof UploadedFileInterface) { |
|
1649 | + if (!$file instanceof UploadedFileInterface) { |
|
1650 | 1650 | throw new InvalidArgumentException("Fichier invalide à '{$path}{$key}'"); |
1651 | 1651 | } |
1652 | 1652 | } |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | } |
1698 | 1698 | |
1699 | 1699 | $host = $uri->getHost(); |
1700 | - if (! $host) { |
|
1700 | + if (!$host) { |
|
1701 | 1701 | return $new; |
1702 | 1702 | } |
1703 | 1703 | $port = $uri->getPort(); |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | $validLocales = config('app.supported_locales'); |
1806 | 1806 | // S'il ne s'agit pas d'un paramètre régional valide, définissez-le |
1807 | 1807 | // aux paramètres régionaux par défaut du site. |
1808 | - if (! in_array($locale, $validLocales, true)) { |
|
1808 | + if (!in_array($locale, $validLocales, true)) { |
|
1809 | 1809 | $locale = config('app.language'); |
1810 | 1810 | } |
1811 | 1811 | |
@@ -1905,7 +1905,7 @@ discard block |
||
1905 | 1905 | $override = true; |
1906 | 1906 | } |
1907 | 1907 | |
1908 | - if ($override && ! in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
1908 | + if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) { |
|
1909 | 1909 | $data = []; |
1910 | 1910 | } |
1911 | 1911 | |
@@ -1955,7 +1955,7 @@ discard block |
||
1955 | 1955 | */ |
1956 | 1956 | protected function _processFiles(array $post, array $files): array |
1957 | 1957 | { |
1958 | - if (! is_array($files)) { |
|
1958 | + if (!is_array($files)) { |
|
1959 | 1959 | return $post; |
1960 | 1960 | } |
1961 | 1961 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->renderVars['file'] = $this->getRenderedFile($options, $this->renderVars['view'], 'tpl'); |
62 | 62 | |
63 | 63 | $layout = $this->layout; |
64 | - if (! empty($layout)) { |
|
64 | + if (!empty($layout)) { |
|
65 | 65 | if (empty(pathinfo($layout, PATHINFO_EXTENSION))) { |
66 | 66 | $layout .= '.tpl'; |
67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $this->engine->assign($this->data); |
72 | 72 | |
73 | 73 | // Doit-on mettre en cache? |
74 | - if (! empty($this->renderVars['options']['cache_name']) || ! empty($this->renderVars['options']['cache'])) { |
|
74 | + if (!empty($this->renderVars['options']['cache_name']) || !empty($this->renderVars['options']['cache'])) { |
|
75 | 75 | $this->enableCache(); |
76 | 76 | $this->engine->setCacheLifetime(60 * ($this->renderVars['options']['cache'] ?? 60)); |
77 | 77 | $this->engine->setCompileId($this->renderVars['options']['cache_name'] ?? null); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | use BlitzPHP\Utilities\String\Inflector; |
13 | 13 | use BlitzPHP\Utilities\String\Text; |
14 | 14 | |
15 | -if (! function_exists('camelize')) { |
|
15 | +if (!function_exists('camelize')) { |
|
16 | 16 | /** |
17 | 17 | * Camelize |
18 | 18 | * |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | -if (! function_exists('classify')) { |
|
29 | +if (!function_exists('classify')) { |
|
30 | 30 | /** |
31 | 31 | * Returns model class name ("Person" for the database table "people".) for given database table. |
32 | 32 | * |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -if (! function_exists('dasherize')) { |
|
43 | +if (!function_exists('dasherize')) { |
|
44 | 44 | /** |
45 | 45 | * Returns the input CamelCasedString as an dashed-string. |
46 | 46 | * |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | -if (! function_exists('delimit')) { |
|
59 | +if (!function_exists('delimit')) { |
|
60 | 60 | /** |
61 | 61 | * Expects a CamelCasedInputString, and produces a lower_case_delimited_string |
62 | 62 | * |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | -if (! function_exists('humanize')) { |
|
74 | +if (!function_exists('humanize')) { |
|
75 | 75 | /** |
76 | 76 | * Humanize |
77 | 77 | * |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | -if (! function_exists('plural')) { |
|
89 | +if (!function_exists('plural')) { |
|
90 | 90 | /** |
91 | 91 | * Plural |
92 | 92 | * |
@@ -96,30 +96,30 @@ discard block |
||
96 | 96 | { |
97 | 97 | $result = $string; |
98 | 98 | |
99 | - if (! is_pluralizable($result)) { |
|
99 | + if (!is_pluralizable($result)) { |
|
100 | 100 | return $result; |
101 | 101 | } |
102 | 102 | |
103 | 103 | $plural_rules = [ |
104 | - '/(quiz)$/' => '\1zes', // quizzes |
|
105 | - '/^(ox)$/' => '\1\2en', // ox |
|
106 | - '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
107 | - '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
108 | - '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
109 | - '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
110 | - '/(hive)$/' => '\1s', // archive, hive |
|
111 | - '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
112 | - '/sis$/' => 'ses', // basis, diagnosis |
|
113 | - '/([ti])um$/' => '\1a', // datum, medium |
|
114 | - '/(p)erson$/' => '\1eople', // person, salesperson |
|
115 | - '/(m)an$/' => '\1en', // man, woman, spokesman |
|
116 | - '/(c)hild$/' => '\1hildren', // child |
|
117 | - '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
118 | - '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
119 | - '/(alias|status|virus)$/' => '\1es', // alias |
|
120 | - '/(octop)us$/' => '\1i', // octopus |
|
121 | - '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
122 | - '/s$/' => 's', // no change (compatibility) |
|
104 | + '/(quiz)$/' => '\1zes', // quizzes |
|
105 | + '/^(ox)$/' => '\1\2en', // ox |
|
106 | + '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
107 | + '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
108 | + '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
109 | + '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
110 | + '/(hive)$/' => '\1s', // archive, hive |
|
111 | + '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
112 | + '/sis$/' => 'ses', // basis, diagnosis |
|
113 | + '/([ti])um$/' => '\1a', // datum, medium |
|
114 | + '/(p)erson$/' => '\1eople', // person, salesperson |
|
115 | + '/(m)an$/' => '\1en', // man, woman, spokesman |
|
116 | + '/(c)hild$/' => '\1hildren', // child |
|
117 | + '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
118 | + '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
119 | + '/(alias|status|virus)$/' => '\1es', // alias |
|
120 | + '/(octop)us$/' => '\1i', // octopus |
|
121 | + '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
122 | + '/s$/' => 's', // no change (compatibility) |
|
123 | 123 | '/$/' => 's', |
124 | 124 | ]; |
125 | 125 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | -if (! function_exists('pluralize')) { |
|
137 | +if (!function_exists('pluralize')) { |
|
138 | 138 | /** |
139 | 139 | * Return $word in plural form. |
140 | 140 | * |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | } |
150 | 150 | |
151 | -if (! function_exists('singular')) { |
|
151 | +if (!function_exists('singular')) { |
|
152 | 152 | /** |
153 | 153 | * Singular |
154 | 154 | * |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | $result = $string; |
160 | 160 | |
161 | - if (! is_pluralizable($result)) { |
|
161 | + if (!is_pluralizable($result)) { |
|
162 | 162 | return $result; |
163 | 163 | } |
164 | 164 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
207 | -if (! function_exists('singularize')) { |
|
207 | +if (!function_exists('singularize')) { |
|
208 | 208 | /** |
209 | 209 | * Return $word in singular form. |
210 | 210 | * |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | } |
220 | 220 | |
221 | -if (! function_exists('tableize')) { |
|
221 | +if (!function_exists('tableize')) { |
|
222 | 222 | /** |
223 | 223 | * Returns corresponding table name for given model $className. ("people" for the model class "Person"). |
224 | 224 | * |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | -if (! function_exists('underscore')) { |
|
235 | +if (!function_exists('underscore')) { |
|
236 | 236 | /** |
237 | 237 | * Underscore |
238 | 238 | * |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | } |
247 | 247 | } |
248 | 248 | |
249 | -if (! function_exists('variable')) { |
|
249 | +if (!function_exists('variable')) { |
|
250 | 250 | /** |
251 | 251 | * Returns camelBacked version of an underscored string. |
252 | 252 | * |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
263 | -if (! function_exists('counted')) { |
|
263 | +if (!function_exists('counted')) { |
|
264 | 264 | /** |
265 | 265 | * Counted |
266 | 266 | * |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | } |
279 | 279 | } |
280 | 280 | |
281 | -if (! function_exists('pascalize')) { |
|
281 | +if (!function_exists('pascalize')) { |
|
282 | 282 | /** |
283 | 283 | * Pascalize |
284 | 284 | * |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | } |
295 | 295 | } |
296 | 296 | |
297 | -if (! function_exists('is_pluralizable')) { |
|
297 | +if (!function_exists('is_pluralizable')) { |
|
298 | 298 | /** |
299 | 299 | * Checks if the given word has a plural version. |
300 | 300 | * |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | */ |
303 | 303 | function is_pluralizable(string $word): bool |
304 | 304 | { |
305 | - return ! in_array( |
|
305 | + return !in_array( |
|
306 | 306 | strtolower($word), |
307 | 307 | [ |
308 | 308 | 'advice', |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | } |
378 | 378 | } |
379 | 379 | |
380 | -if (! function_exists('ordinal')) { |
|
380 | +if (!function_exists('ordinal')) { |
|
381 | 381 | /** |
382 | 382 | * Returns the suffix that should be added to a |
383 | 383 | * number to denote the position in an ordered |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | } |
406 | 406 | |
407 | -if (! function_exists('ordinalize')) { |
|
407 | +if (!function_exists('ordinalize')) { |
|
408 | 408 | /** |
409 | 409 | * Turns a number into an ordinal string used |
410 | 410 | * to denote the position in an ordered sequence |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $controller = $routes->getDefaultController(); |
178 | 178 | } |
179 | 179 | |
180 | - if (! $fullName && is_string($controller)) { |
|
180 | + if (!$fullName && is_string($controller)) { |
|
181 | 181 | $controller = str_replace($routes->getDefaultNamespace(), '', $controller); |
182 | 182 | } |
183 | 183 | |
@@ -303,14 +303,14 @@ discard block |
||
303 | 303 | return; |
304 | 304 | } |
305 | 305 | |
306 | - if (is_cli() && ! on_test()) { |
|
306 | + if (is_cli() && !on_test()) { |
|
307 | 307 | // @codeCoverageIgnoreStart |
308 | 308 | // $this->request = Services::clirequest($this->config); |
309 | 309 | // @codeCoverageIgnoreEnd |
310 | 310 | } |
311 | 311 | |
312 | 312 | $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'; |
313 | - if (! is_numeric($version)) { |
|
313 | + if (!is_numeric($version)) { |
|
314 | 314 | $version = substr($version, strpos($version, '/') + 1); |
315 | 315 | } |
316 | 316 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | // Supposons le succès jusqu'à preuve du contraire. |
330 | 330 | $this->response = Services::response()->withStatus(200); |
331 | 331 | |
332 | - if (! is_cli() || on_test()) { |
|
332 | + if (!is_cli() || on_test()) { |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion()); |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | } |
427 | 427 | |
428 | 428 | // Essayez de charger automatiquement la classe |
429 | - if (! class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) { |
|
429 | + if (!class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) { |
|
430 | 430 | throw PageNotFoundException::controllerNotFound($this->controller, $this->method); |
431 | 431 | } |
432 | 432 | |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | |
516 | 516 | $this->outputBufferingEnd(); |
517 | 517 | |
518 | - throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : ''); |
|
518 | + throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : ''); |
|
519 | 519 | } |
520 | 520 | |
521 | 521 | /** |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | public function storePreviousURL($uri) |
558 | 558 | { |
559 | 559 | // Ignorer les requêtes CLI |
560 | - if (is_cli() && ! on_test()) { |
|
560 | + if (is_cli() && !on_test()) { |
|
561 | 561 | return; // @codeCoverageIgnore |
562 | 562 | } |
563 | 563 | |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | } |
568 | 568 | |
569 | 569 | // Ignorer les reponses non-HTML |
570 | - if (! str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) { |
|
570 | + if (!str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) { |
|
571 | 571 | return; |
572 | 572 | } |
573 | 573 | |
@@ -678,11 +678,11 @@ discard block |
||
678 | 678 | */ |
679 | 679 | private function spoofRequestMethod(): callable |
680 | 680 | { |
681 | - return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
681 | + return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) { |
|
682 | 682 | $post = $request->getParsedBody(); |
683 | 683 | |
684 | 684 | // Ne fonctionne qu'avec les formulaires POST |
685 | - if ($request->getMethod() === 'POST' && ! empty($post['_method'])) { |
|
685 | + if ($request->getMethod() === 'POST' && !empty($post['_method'])) { |
|
686 | 686 | // Accepte seulement PUT, PATCH, DELETE |
687 | 687 | if (in_array($post['_method'], ['PUT', 'PATCH', 'DELETE'], true)) { |
688 | 688 | $request = $request->withMethod($post['_method']); |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | |
696 | 696 | private function bootApp(): callable |
697 | 697 | { |
698 | - return function (ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
698 | + return function(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface { |
|
699 | 699 | Services::set(Request::class, $request); |
700 | 700 | Services::set(Response::class, $response); |
701 | 701 | |
@@ -703,10 +703,10 @@ discard block |
||
703 | 703 | $returned = $this->startController(); |
704 | 704 | |
705 | 705 | // Les controleur sous forme de Closure sont executes dans startController(). |
706 | - if (! is_callable($this->controller)) { |
|
706 | + if (!is_callable($this->controller)) { |
|
707 | 707 | $controller = $this->createController($request, $response); |
708 | 708 | |
709 | - if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) { |
|
709 | + if (!method_exists($controller, '_remap') && !is_callable([$controller, $this->method], false)) { |
|
710 | 710 | throw PageNotFoundException::methodNotFound($this->method); |
711 | 711 | } |
712 | 712 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | // ================================= FONCTIONS UTIILITAIRES ESSENTIELLES ================================= // |
30 | 30 | |
31 | -if (! function_exists('env')) { |
|
31 | +if (!function_exists('env')) { |
|
32 | 32 | /** |
33 | 33 | * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation |
34 | 34 | * pour les variables d'environnement non prises en charge ou incohérentes |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
47 | -if (! function_exists('helper')) { |
|
47 | +if (!function_exists('helper')) { |
|
48 | 48 | /** |
49 | 49 | * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms, |
50 | 50 | * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms. |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | -if (! function_exists('model')) { |
|
63 | +if (!function_exists('model')) { |
|
64 | 64 | /** |
65 | 65 | * Simple maniere d'obtenir un modele. |
66 | 66 | * |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | * |
71 | 71 | * @return T |
72 | 72 | */ |
73 | - function model(array|string $name, ?ConnectionInterface &$conn = null) |
|
73 | + function model(array|string $name, ?ConnectionInterface&$conn = null) |
|
74 | 74 | { |
75 | 75 | return Load::model($name, $conn); |
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | -if (! function_exists('service')) { |
|
79 | +if (!function_exists('service')) { |
|
80 | 80 | /** |
81 | 81 | * Permet un accès plus propre au fichier de configuration des services. |
82 | 82 | * Renvoie toujours une instance SHARED de la classe, donc l'appel de la fonction plusieurs fois renvera toujours la même instance. |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
100 | -if (! function_exists('single_service')) { |
|
100 | +if (!function_exists('single_service')) { |
|
101 | 101 | /** |
102 | 102 | * Autoriser l'accès propre à un service. |
103 | 103 | * Renvoie toujours une nouvelle instance de la classe. |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | -if (! function_exists('show404')) { |
|
120 | +if (!function_exists('show404')) { |
|
121 | 121 | /** |
122 | 122 | * Afficher une page 404 introuvable dans le navigateur |
123 | 123 | */ |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | -if (! function_exists('command')) { |
|
130 | +if (!function_exists('command')) { |
|
131 | 131 | /** |
132 | 132 | * Exécute une seule commande. |
133 | 133 | * Entrée attendue dans une seule chaîne comme celle qui serait utilisée sur la ligne de commande elle-même : |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | -if (! function_exists('config')) { |
|
192 | +if (!function_exists('config')) { |
|
193 | 193 | /** |
194 | 194 | * GET/SET App config |
195 | 195 | * |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | } |
219 | 219 | |
220 | -if (! function_exists('logger')) { |
|
220 | +if (!function_exists('logger')) { |
|
221 | 221 | /** |
222 | 222 | * Une méthode de commodité pour les événements de journalisation via le système Log. |
223 | 223 | * |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | -if (! function_exists('cache')) { |
|
250 | +if (!function_exists('cache')) { |
|
251 | 251 | /** |
252 | 252 | * Une méthode pratique qui donne accès au cache |
253 | 253 | * objet. Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | } |
278 | 278 | } |
279 | 279 | |
280 | -if (! function_exists('cookie')) { |
|
280 | +if (!function_exists('cookie')) { |
|
281 | 281 | /** |
282 | 282 | * Une méthode pratique qui donne accès à l'objet cookie. |
283 | 283 | * Si aucun paramètre n'est fourni, renverra l'objet, |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | } |
307 | 307 | |
308 | -if (! function_exists('session')) { |
|
308 | +if (!function_exists('session')) { |
|
309 | 309 | /** |
310 | 310 | * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session. |
311 | 311 | * |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== // |
332 | 332 | |
333 | -if (! function_exists('esc')) { |
|
333 | +if (!function_exists('esc')) { |
|
334 | 334 | /** |
335 | 335 | * Effectue un simple échappement automatique des données pour des raisons de sécurité. |
336 | 336 | * Pourrait envisager de rendre cela plus complexe à une date ultérieure. |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | } |
358 | 358 | } |
359 | 359 | |
360 | -if (! function_exists('h')) { |
|
360 | +if (!function_exists('h')) { |
|
361 | 361 | /** |
362 | 362 | * Méthode pratique pour htmlspecialchars. |
363 | 363 | * |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | } |
377 | 377 | } |
378 | 378 | |
379 | -if (! function_exists('purify')) { |
|
379 | +if (!function_exists('purify')) { |
|
380 | 380 | /** |
381 | 381 | * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier. |
382 | 382 | * Utilisez facilement plusieurs configurations de purificateur. |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | } |
393 | 393 | } |
394 | 394 | |
395 | -if (! function_exists('remove_invisible_characters')) { |
|
395 | +if (!function_exists('remove_invisible_characters')) { |
|
396 | 396 | /** |
397 | 397 | * Supprimer les caractères invisibles |
398 | 398 | * |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | } |
407 | 407 | |
408 | -if (! function_exists('stringify_attributes')) { |
|
408 | +if (!function_exists('stringify_attributes')) { |
|
409 | 409 | /** |
410 | 410 | * Chaîner les attributs à utiliser dans les balises HTML. |
411 | 411 | * |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | |
420 | 420 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
421 | 421 | |
422 | -if (! function_exists('environment')) { |
|
422 | +if (!function_exists('environment')) { |
|
423 | 423 | /** |
424 | 424 | * Renvoi l'environnement d'execution actuel ou determine si on est dans un environnement specifie |
425 | 425 | * |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } |
458 | 458 | } |
459 | 459 | |
460 | -if (! function_exists('on_dev')) { |
|
460 | +if (!function_exists('on_dev')) { |
|
461 | 461 | /** |
462 | 462 | * Testez pour voir si nous sommes dans un environnement de développement. |
463 | 463 | */ |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | } |
473 | 473 | |
474 | -if (! function_exists('on_prod')) { |
|
474 | +if (!function_exists('on_prod')) { |
|
475 | 475 | /** |
476 | 476 | * Testez pour voir si nous sommes dans un environnement de production. |
477 | 477 | */ |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | } |
487 | 487 | |
488 | -if (! function_exists('on_test')) { |
|
488 | +if (!function_exists('on_test')) { |
|
489 | 489 | /** |
490 | 490 | * Testez pour voir si nous sommes dans un environnement de test |
491 | 491 | */ |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | } |
496 | 496 | } |
497 | 497 | |
498 | -if (! function_exists('is_cli')) { |
|
498 | +if (!function_exists('is_cli')) { |
|
499 | 499 | /** |
500 | 500 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
501 | 501 | */ |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | } |
506 | 506 | } |
507 | 507 | |
508 | -if (! function_exists('is_php')) { |
|
508 | +if (!function_exists('is_php')) { |
|
509 | 509 | /** |
510 | 510 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
511 | 511 | */ |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | } |
516 | 516 | } |
517 | 517 | |
518 | -if (! function_exists('is_windows')) { |
|
518 | +if (!function_exists('is_windows')) { |
|
519 | 519 | /** |
520 | 520 | * Déterminez si l'environnement actuel est basé sur Windows. |
521 | 521 | */ |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | } |
526 | 526 | } |
527 | 527 | |
528 | -if (! function_exists('is_https')) { |
|
528 | +if (!function_exists('is_https')) { |
|
529 | 529 | /** |
530 | 530 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
531 | 531 | */ |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | } |
536 | 536 | } |
537 | 537 | |
538 | -if (! function_exists('is_localfile')) { |
|
538 | +if (!function_exists('is_localfile')) { |
|
539 | 539 | /** |
540 | 540 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
541 | 541 | */ |
@@ -545,11 +545,11 @@ discard block |
||
545 | 545 | return true; |
546 | 546 | } |
547 | 547 | |
548 | - return ! preg_match('#^(https?://)#i', $name); |
|
548 | + return !preg_match('#^(https?://)#i', $name); |
|
549 | 549 | } |
550 | 550 | } |
551 | 551 | |
552 | -if (! function_exists('is_online')) { |
|
552 | +if (!function_exists('is_online')) { |
|
553 | 553 | /** |
554 | 554 | * Tester si l'application s'exécute en local ou en ligne. |
555 | 555 | */ |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | } |
560 | 560 | } |
561 | 561 | |
562 | -if (! function_exists('is_connected')) { |
|
562 | +if (!function_exists('is_connected')) { |
|
563 | 563 | /** |
564 | 564 | * Verifie si l'utilisateur a une connexion internet active. |
565 | 565 | */ |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | } |
570 | 570 | } |
571 | 571 | |
572 | -if (! function_exists('is_ajax_request')) { |
|
572 | +if (!function_exists('is_ajax_request')) { |
|
573 | 573 | /** |
574 | 574 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
575 | 575 | */ |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | } |
580 | 580 | } |
581 | 581 | |
582 | -if (! function_exists('redirection')) { |
|
582 | +if (!function_exists('redirection')) { |
|
583 | 583 | /** |
584 | 584 | * Redirige l'utilisateur |
585 | 585 | */ |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | } |
594 | 594 | } |
595 | 595 | |
596 | -if (! function_exists('redirect')) { |
|
596 | +if (!function_exists('redirect')) { |
|
597 | 597 | /** |
598 | 598 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
599 | 599 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | { |
608 | 608 | $redirection = Services::redirection(); |
609 | 609 | |
610 | - if (! empty($uri)) { |
|
610 | + if (!empty($uri)) { |
|
611 | 611 | return $redirection->route($uri); |
612 | 612 | } |
613 | 613 | |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } |
616 | 616 | } |
617 | 617 | |
618 | -if (! function_exists('back')) { |
|
618 | +if (!function_exists('back')) { |
|
619 | 619 | /** |
620 | 620 | * Retourne a la page precedente |
621 | 621 | * |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | } |
628 | 628 | } |
629 | 629 | |
630 | -if (! function_exists('link_to')) { |
|
630 | +if (!function_exists('link_to')) { |
|
631 | 631 | /** |
632 | 632 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
633 | 633 | * tentera de créer l'URL relative à la route correspondante. |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | } |
648 | 648 | } |
649 | 649 | |
650 | -if (! function_exists('clean_path')) { |
|
650 | +if (!function_exists('clean_path')) { |
|
651 | 651 | /** |
652 | 652 | * Une méthode pratique pour nettoyer les chemins pour |
653 | 653 | * une sortie plus belle. Utile pour les exceptions |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | } |
680 | 680 | } |
681 | 681 | |
682 | -if (! function_exists('old')) { |
|
682 | +if (!function_exists('old')) { |
|
683 | 683 | /** |
684 | 684 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
685 | 685 | * |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | function old(string $key, $default = null, $escape = 'html') |
693 | 693 | { |
694 | 694 | // Assurez-vous de charger la session |
695 | - if (session_status() === PHP_SESSION_NONE && ! on_test()) { |
|
695 | + if (session_status() === PHP_SESSION_NONE && !on_test()) { |
|
696 | 696 | session(); // @codeCoverageIgnore |
697 | 697 | } |
698 | 698 | |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | |
708 | 708 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
709 | 709 | |
710 | -if (! function_exists('deprecationWarning')) { |
|
710 | +if (!function_exists('deprecationWarning')) { |
|
711 | 711 | /** |
712 | 712 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
713 | 713 | * |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | } |
724 | 724 | } |
725 | 725 | |
726 | -if (! function_exists('pr')) { |
|
726 | +if (!function_exists('pr')) { |
|
727 | 727 | /** |
728 | 728 | * print_r() convenience function. |
729 | 729 | * |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | } |
746 | 746 | } |
747 | 747 | |
748 | -if (! function_exists('pj')) { |
|
748 | +if (!function_exists('pj')) { |
|
749 | 749 | /** |
750 | 750 | * json pretty print convenience function. |
751 | 751 | * |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | } |
767 | 767 | } |
768 | 768 | |
769 | -if (! function_exists('trigger_warning')) { |
|
769 | +if (!function_exists('trigger_warning')) { |
|
770 | 770 | /** |
771 | 771 | * Déclenche un E_USER_WARNING. |
772 | 772 | */ |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | |
779 | 779 | // ================================= FONCTIONS DIVERSES ================================= // |
780 | 780 | |
781 | -if (! function_exists('force_https')) { |
|
781 | +if (!function_exists('force_https')) { |
|
782 | 782 | /** |
783 | 783 | * Utilisé pour forcer l'accès à une page via HTTPS. |
784 | 784 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | |
806 | 806 | // Si la session est active, nous devons régénérer |
807 | 807 | // l'ID de session pour des raisons de sécurité. |
808 | - if (! on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
808 | + if (!on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
809 | 809 | Services::session()->regenerate(); // @codeCoverageIgnore |
810 | 810 | } |
811 | 811 | |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | } |
822 | 822 | } |
823 | 823 | |
824 | -if (! function_exists('get_type_name')) { |
|
824 | +if (!function_exists('get_type_name')) { |
|
825 | 825 | /** |
826 | 826 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
827 | 827 | * |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | } |
836 | 836 | } |
837 | 837 | |
838 | -if (! function_exists('ip_address')) { |
|
838 | +if (!function_exists('ip_address')) { |
|
839 | 839 | /** |
840 | 840 | * Renvoie l'adresse IP de l'utilisateur actuel |
841 | 841 | */ |
@@ -845,7 +845,7 @@ discard block |
||
845 | 845 | } |
846 | 846 | } |
847 | 847 | |
848 | -if (! function_exists('is_really_writable')) { |
|
848 | +if (!function_exists('is_really_writable')) { |
|
849 | 849 | /** |
850 | 850 | * Tests d'inscriptibilité des fichiers |
851 | 851 | */ |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | } |
856 | 856 | } |
857 | 857 | |
858 | -if (! function_exists('lang')) { |
|
858 | +if (!function_exists('lang')) { |
|
859 | 859 | /** |
860 | 860 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
861 | 861 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | } |
867 | 867 | } |
868 | 868 | |
869 | -if (! function_exists('__')) { |
|
869 | +if (!function_exists('__')) { |
|
870 | 870 | /** |
871 | 871 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
872 | 872 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -879,7 +879,7 @@ discard block |
||
879 | 879 | } |
880 | 880 | } |
881 | 881 | |
882 | -if (! function_exists('namespace_split')) { |
|
882 | +if (!function_exists('namespace_split')) { |
|
883 | 883 | /** |
884 | 884 | * Séparez l'espace de noms du nom de classe. |
885 | 885 | * |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | } |
901 | 901 | } |
902 | 902 | |
903 | -if (! function_exists('view_exist')) { |
|
903 | +if (!function_exists('view_exist')) { |
|
904 | 904 | /** |
905 | 905 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
906 | 906 | */ |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | } |
915 | 915 | } |
916 | 916 | |
917 | -if (! function_exists('view')) { |
|
917 | +if (!function_exists('view')) { |
|
918 | 918 | /** |
919 | 919 | * Charge une vue |
920 | 920 | * |
@@ -930,7 +930,7 @@ discard block |
||
930 | 930 | } |
931 | 931 | } |
932 | 932 | |
933 | -if (! function_exists('flash')) { |
|
933 | +if (!function_exists('flash')) { |
|
934 | 934 | /** |
935 | 935 | * Fournisseur d'acces rapide a la classe PHP Flash |
936 | 936 | * |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | }*/ |
963 | 963 | } |
964 | 964 | |
965 | -if (! function_exists('geo_ip')) { |
|
965 | +if (!function_exists('geo_ip')) { |
|
966 | 966 | /** |
967 | 967 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
968 | 968 | */ |
@@ -972,7 +972,7 @@ discard block |
||
972 | 972 | } |
973 | 973 | } |
974 | 974 | |
975 | -if (! function_exists('to_stream')) { |
|
975 | +if (!function_exists('to_stream')) { |
|
976 | 976 | /** |
977 | 977 | * Créez un nouveau flux basé sur le type d'entrée. |
978 | 978 | * |
@@ -993,7 +993,7 @@ discard block |
||
993 | 993 | } |
994 | 994 | } |
995 | 995 | |
996 | -if (! function_exists('value')) { |
|
996 | +if (!function_exists('value')) { |
|
997 | 997 | /** |
998 | 998 | * Renvoie la valeur par défaut de la valeur donnée. |
999 | 999 | */ |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | } |
1004 | 1004 | } |
1005 | 1005 | |
1006 | -if (! function_exists('collect')) { |
|
1006 | +if (!function_exists('collect')) { |
|
1007 | 1007 | /** |
1008 | 1008 | * Créez une collection à partir de la valeur donnée. |
1009 | 1009 | */ |
@@ -1013,7 +1013,7 @@ discard block |
||
1013 | 1013 | } |
1014 | 1014 | } |
1015 | 1015 | |
1016 | -if (! function_exists('with')) { |
|
1016 | +if (!function_exists('with')) { |
|
1017 | 1017 | /** |
1018 | 1018 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
1019 | 1019 | * |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | } |
1026 | 1026 | } |
1027 | 1027 | |
1028 | -if (! function_exists('tap')) { |
|
1028 | +if (!function_exists('tap')) { |
|
1029 | 1029 | /** |
1030 | 1030 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
1031 | 1031 | */ |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | } |
1036 | 1036 | } |
1037 | 1037 | |
1038 | -if (! function_exists('last')) { |
|
1038 | +if (!function_exists('last')) { |
|
1039 | 1039 | /** |
1040 | 1040 | * Recupere le dernier element d'un tableau |
1041 | 1041 | */ |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | } |
1046 | 1046 | } |
1047 | 1047 | |
1048 | -if (! function_exists('invade')) { |
|
1048 | +if (!function_exists('invade')) { |
|
1049 | 1049 | /** |
1050 | 1050 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
1051 | 1051 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | $response = $handler->handle($request); |
28 | 28 | |
29 | - if (! empty($body = $response->getBody()->getContents())) { |
|
29 | + if (!empty($body = $response->getBody()->getContents())) { |
|
30 | 30 | $benchmark = Services::timer(); |
31 | 31 | |
32 | 32 | $output = str_replace( |
@@ -37,7 +37,7 @@ |
||
37 | 37 | try { |
38 | 38 | force_https(YEAR, $request, Services::redirection()); |
39 | 39 | |
40 | - return $handler->handle($request); |
|
40 | + return $handler->handle($request); |
|
41 | 41 | } catch (RedirectException $e) { |
42 | 42 | return $e->getResponse(); |
43 | 43 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $response = $handler->handle($request); |
38 | 38 | $content = $response->getBody()->getContents(); |
39 | 39 | |
40 | - if (! $response instanceof Redirection) { |
|
40 | + if (!$response instanceof Redirection) { |
|
41 | 41 | // Mettez-le en cache sans remplacer les mesures de performances afin que nous puissions avoir des mises à jour de vitesse en direct en cours de route. |
42 | 42 | // Doit être exécuté après les filtres pour conserver les en-têtes de réponse. |
43 | 43 | $this->pageCache->make($request, $response->withBody(to_stream($content))); |