@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * the LICENSE file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 | |
12 | -if (! function_exists('css_path')) { |
|
12 | +if (!function_exists('css_path')) { |
|
13 | 13 | /** |
14 | 14 | * CSS PATH |
15 | 15 | * |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | function css_path(string $name = ''): string |
21 | 21 | { |
22 | - if (! empty($name)) { |
|
22 | + if (!empty($name)) { |
|
23 | 23 | $name = ltrim($name, '/\\'); |
24 | 24 | |
25 | 25 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | -if (! function_exists('js_path')) { |
|
34 | +if (!function_exists('js_path')) { |
|
35 | 35 | /** |
36 | 36 | * JS PATH |
37 | 37 | * |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | function js_path(string $name = ''): string |
43 | 43 | { |
44 | - if (! empty($name)) { |
|
44 | + if (!empty($name)) { |
|
45 | 45 | $name = ltrim($name, '/\\'); |
46 | 46 | |
47 | 47 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
56 | -if (! function_exists('lib_path')) { |
|
56 | +if (!function_exists('lib_path')) { |
|
57 | 57 | /** |
58 | 58 | * LIB PATH |
59 | 59 | * |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | function lib_path(string $name = ''): string |
65 | 65 | { |
66 | - if (! empty($name)) { |
|
66 | + if (!empty($name)) { |
|
67 | 67 | $name = ltrim($name, '/\\'); |
68 | 68 | } |
69 | 69 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | -if (! function_exists('less_path')) { |
|
74 | +if (!function_exists('less_path')) { |
|
75 | 75 | /** |
76 | 76 | * LESS PATH |
77 | 77 | * |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | function less_path(string $name = ''): string |
83 | 83 | { |
84 | - if (! empty($name)) { |
|
84 | + if (!empty($name)) { |
|
85 | 85 | $name = ltrim($name, '/\\'); |
86 | 86 | |
87 | 87 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | -if (! function_exists('img_path')) { |
|
96 | +if (!function_exists('img_path')) { |
|
97 | 97 | /** |
98 | 98 | * IMG PATH |
99 | 99 | * |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | function img_path(string $name = ''): string |
105 | 105 | { |
106 | - if (! empty($name)) { |
|
106 | + if (!empty($name)) { |
|
107 | 107 | $name = ltrim($name, '/\\'); |
108 | 108 | } |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
114 | -if (! function_exists('docs_path')) { |
|
114 | +if (!function_exists('docs_path')) { |
|
115 | 115 | /** |
116 | 116 | * DOCS PATH |
117 | 117 | * |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | function docs_path(string $name = ''): string |
123 | 123 | { |
124 | - if (! empty($name)) { |
|
124 | + if (!empty($name)) { |
|
125 | 125 | $name = ltrim($name, '/\\'); |
126 | 126 | } |
127 | 127 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
132 | -if (! function_exists('video_path')) { |
|
132 | +if (!function_exists('video_path')) { |
|
133 | 133 | /** |
134 | 134 | * VIDEO PATH |
135 | 135 | * |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | function video_path(string $name = ''): string |
141 | 141 | { |
142 | - if (! empty($name)) { |
|
142 | + if (!empty($name)) { |
|
143 | 143 | $name = ltrim($name, '/\\'); |
144 | 144 | } |
145 | 145 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | -if (! function_exists('public_path')) { |
|
150 | +if (!function_exists('public_path')) { |
|
151 | 151 | /** |
152 | 152 | * PUBLIC PATH |
153 | 153 | * |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | function public_path(string $name = ''): string |
159 | 159 | { |
160 | - if (! empty($name)) { |
|
160 | + if (!empty($name)) { |
|
161 | 161 | $name = ltrim($name, '/\\'); |
162 | 162 | } |
163 | 163 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
168 | -if (! function_exists('root_path')) { |
|
168 | +if (!function_exists('root_path')) { |
|
169 | 169 | /** |
170 | 170 | * ROOT PATH |
171 | 171 | * |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | function root_path(string $name = ''): string |
177 | 177 | { |
178 | - if (! empty($name)) { |
|
178 | + if (!empty($name)) { |
|
179 | 179 | $name = ltrim($name, '/\\'); |
180 | 180 | } |
181 | 181 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
186 | -if (! function_exists('base_path')) { |
|
186 | +if (!function_exists('base_path')) { |
|
187 | 187 | /** |
188 | 188 | * BASE PATH |
189 | 189 | * |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | */ |
194 | 194 | function base_path(string $name = ''): string |
195 | 195 | { |
196 | - if (! empty($name)) { |
|
196 | + if (!empty($name)) { |
|
197 | 197 | $name = ltrim($name, '/\\'); |
198 | 198 | } |
199 | 199 | |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | } |
202 | 202 | } |
203 | 203 | |
204 | -if (! function_exists('resource_path')) { |
|
204 | +if (!function_exists('resource_path')) { |
|
205 | 205 | /** |
206 | 206 | * BASE RESOURCE PATH |
207 | 207 | * |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | */ |
212 | 212 | function resource_path(string $name = ''): string |
213 | 213 | { |
214 | - if (! empty($name)) { |
|
214 | + if (!empty($name)) { |
|
215 | 215 | $name = ltrim($name, '/\\'); |
216 | 216 | } |
217 | 217 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | -if (! function_exists('class_path')) { |
|
222 | +if (!function_exists('class_path')) { |
|
223 | 223 | /** |
224 | 224 | * CLASS PATH |
225 | 225 | * |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | function class_path(string $name = ''): string |
231 | 231 | { |
232 | - if (! empty($name)) { |
|
232 | + if (!empty($name)) { |
|
233 | 233 | $name = ltrim($name, '/\\'); |
234 | 234 | } |
235 | 235 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } |
238 | 238 | } |
239 | 239 | |
240 | -if (! function_exists('config_path')) { |
|
240 | +if (!function_exists('config_path')) { |
|
241 | 241 | /** |
242 | 242 | * CONFIG PATH |
243 | 243 | * |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | function config_path(string $name = ''): string |
249 | 249 | { |
250 | - if (! empty($name)) { |
|
250 | + if (!empty($name)) { |
|
251 | 251 | $name = ltrim($name, '/\\'); |
252 | 252 | |
253 | 253 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | } |
261 | 261 | |
262 | -if (! function_exists('controller_path')) { |
|
262 | +if (!function_exists('controller_path')) { |
|
263 | 263 | /** |
264 | 264 | * CONTROLLER PATH |
265 | 265 | * |
@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | */ |
271 | 271 | function controller_path(string $name = '', bool $only = true): string |
272 | 272 | { |
273 | - if (! empty($name)) { |
|
273 | + if (!empty($name)) { |
|
274 | 274 | $name = ltrim($name, '/\\'); |
275 | 275 | |
276 | - if ($only === true && ! preg_match('#Controller\.php$#', $name)) { |
|
276 | + if ($only === true && !preg_match('#Controller\.php$#', $name)) { |
|
277 | 277 | $name = ucfirst(strtolower($name)) . 'Controller.php'; |
278 | 278 | } |
279 | 279 | } |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | } |
283 | 283 | } |
284 | 284 | |
285 | -if (! function_exists('entity_path')) { |
|
285 | +if (!function_exists('entity_path')) { |
|
286 | 286 | /** |
287 | 287 | * ENTITY PATH |
288 | 288 | * |
@@ -293,10 +293,10 @@ discard block |
||
293 | 293 | */ |
294 | 294 | function entity_path(string $name = '', bool $only = true): string |
295 | 295 | { |
296 | - if (! empty($name)) { |
|
296 | + if (!empty($name)) { |
|
297 | 297 | $name = ltrim($name, '/\\'); |
298 | 298 | |
299 | - if ($only === true && ! preg_match('#Entity\.php$#', $name)) { |
|
299 | + if ($only === true && !preg_match('#Entity\.php$#', $name)) { |
|
300 | 300 | $name = ucfirst($name) . 'Entity.php'; |
301 | 301 | } |
302 | 302 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | } |
307 | 307 | |
308 | -if (! function_exists('helper_path')) { |
|
308 | +if (!function_exists('helper_path')) { |
|
309 | 309 | /** |
310 | 310 | * HELPER PATH |
311 | 311 | * |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | */ |
317 | 317 | function helper_path(string $name = '', bool $system = false): string |
318 | 318 | { |
319 | - if (! empty($name)) { |
|
319 | + if (!empty($name)) { |
|
320 | 320 | $name = ltrim($name, '/\\'); |
321 | 321 | |
322 | 322 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | } |
332 | 332 | } |
333 | 333 | |
334 | -if (! function_exists('library_path')) { |
|
334 | +if (!function_exists('library_path')) { |
|
335 | 335 | /** |
336 | 336 | * LIBRARY PATH |
337 | 337 | * |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | function library_path(string $name = '', bool $system = false): string |
344 | 344 | { |
345 | - if (! empty($name)) { |
|
345 | + if (!empty($name)) { |
|
346 | 346 | $name = ltrim($name, '/\\'); |
347 | 347 | |
348 | 348 | if (empty(pathinfo($name, PATHINFO_EXTENSION))) { |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | } |
359 | 359 | } |
360 | 360 | |
361 | -if (! function_exists('middleware_path')) { |
|
361 | +if (!function_exists('middleware_path')) { |
|
362 | 362 | /** |
363 | 363 | * MIDDLEWARE PATH |
364 | 364 | * |
@@ -370,10 +370,10 @@ discard block |
||
370 | 370 | */ |
371 | 371 | function middleware_path(string $name = '', bool $system = false, bool $only = true): string |
372 | 372 | { |
373 | - if (! empty($name)) { |
|
373 | + if (!empty($name)) { |
|
374 | 374 | $name = ltrim($name, '/\\'); |
375 | 375 | |
376 | - if ($only === true && ! preg_match('#Middleware\.php$#', $name)) { |
|
376 | + if ($only === true && !preg_match('#Middleware\.php$#', $name)) { |
|
377 | 377 | $name = ucfirst($name) . 'Middleware.php'; |
378 | 378 | } |
379 | 379 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | } |
387 | 387 | |
388 | -if (! function_exists('model_path')) { |
|
388 | +if (!function_exists('model_path')) { |
|
389 | 389 | /** |
390 | 390 | * MODEL PATH |
391 | 391 | * |
@@ -396,10 +396,10 @@ discard block |
||
396 | 396 | */ |
397 | 397 | function model_path(string $name = '', bool $only = true): string |
398 | 398 | { |
399 | - if (! empty($name)) { |
|
399 | + if (!empty($name)) { |
|
400 | 400 | $name = ltrim($name, '/\\'); |
401 | 401 | |
402 | - if ($only === true && ! preg_match('#Model\.php$#', $name)) { |
|
402 | + if ($only === true && !preg_match('#Model\.php$#', $name)) { |
|
403 | 403 | $name = ucfirst(strtolower($name)) . 'Model.php'; |
404 | 404 | } |
405 | 405 | } |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | } |
410 | 410 | |
411 | -if (! function_exists('app_resource_path')) { |
|
411 | +if (!function_exists('app_resource_path')) { |
|
412 | 412 | /** |
413 | 413 | * APP RESOURCE PATH |
414 | 414 | * |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | */ |
419 | 419 | function app_resource_path(string $name = ''): string |
420 | 420 | { |
421 | - if (! empty($name)) { |
|
421 | + if (!empty($name)) { |
|
422 | 422 | $name = ltrim($name, '/\\'); |
423 | 423 | } |
424 | 424 | |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | } |
427 | 427 | } |
428 | 428 | |
429 | -if (! function_exists('migration_path')) { |
|
429 | +if (!function_exists('migration_path')) { |
|
430 | 430 | /** |
431 | 431 | * MIGRATION PATH |
432 | 432 | * |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | */ |
437 | 437 | function migration_path(string $name = ''): string |
438 | 438 | { |
439 | - if (! empty($name)) { |
|
439 | + if (!empty($name)) { |
|
440 | 440 | $name = ltrim($name, '/\\'); |
441 | 441 | } |
442 | 442 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | } |
445 | 445 | } |
446 | 446 | |
447 | -if (! function_exists('seed_path')) { |
|
447 | +if (!function_exists('seed_path')) { |
|
448 | 448 | /** |
449 | 449 | * SEED PATH |
450 | 450 | * |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | */ |
455 | 455 | function seed_path(string $name = ''): string |
456 | 456 | { |
457 | - if (! empty($name)) { |
|
457 | + if (!empty($name)) { |
|
458 | 458 | $name = ltrim($name, '/\\'); |
459 | 459 | } |
460 | 460 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | } |
463 | 463 | } |
464 | 464 | |
465 | -if (! function_exists('lang_path')) { |
|
465 | +if (!function_exists('lang_path')) { |
|
466 | 466 | /** |
467 | 467 | * LANG PATH |
468 | 468 | * |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | */ |
474 | 474 | function lang_path(string $name = '', bool $system = false): string |
475 | 475 | { |
476 | - if (! empty($name)) { |
|
476 | + if (!empty($name)) { |
|
477 | 477 | $name = ltrim($name, '/\\'); |
478 | 478 | } |
479 | 479 | if ($system === true) { |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | } |
485 | 485 | } |
486 | 486 | |
487 | -if (! function_exists('service_path')) { |
|
487 | +if (!function_exists('service_path')) { |
|
488 | 488 | /** |
489 | 489 | * SERVICE PATH |
490 | 490 | * |
@@ -495,10 +495,10 @@ discard block |
||
495 | 495 | */ |
496 | 496 | function service_path(string $name = '', bool $only = true): string |
497 | 497 | { |
498 | - if (! empty($name)) { |
|
498 | + if (!empty($name)) { |
|
499 | 499 | $name = ltrim($name, '/\\'); |
500 | 500 | |
501 | - if ($only === true && ! preg_match('#Service\.php$#', $name)) { |
|
501 | + if ($only === true && !preg_match('#Service\.php$#', $name)) { |
|
502 | 502 | $name = ucfirst($name) . 'Service.php'; |
503 | 503 | } |
504 | 504 | } |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | } |
508 | 508 | } |
509 | 509 | |
510 | -if (! function_exists('view_path')) { |
|
510 | +if (!function_exists('view_path')) { |
|
511 | 511 | /** |
512 | 512 | * VIEW PATH |
513 | 513 | * |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | */ |
518 | 518 | function view_path(string $name = ''): string |
519 | 519 | { |
520 | - if (! empty($name)) { |
|
520 | + if (!empty($name)) { |
|
521 | 521 | $name = ltrim($name, '/\\'); |
522 | 522 | } |
523 | 523 | |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | } |
526 | 526 | } |
527 | 527 | |
528 | -if (! function_exists('layout_path')) { |
|
528 | +if (!function_exists('layout_path')) { |
|
529 | 529 | /** |
530 | 530 | * LAYOUT PATH |
531 | 531 | * |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | */ |
536 | 536 | function layout_path(string $name = ''): string |
537 | 537 | { |
538 | - if (! empty($name)) { |
|
538 | + if (!empty($name)) { |
|
539 | 539 | $name = ltrim($name, '/\\'); |
540 | 540 | } |
541 | 541 | |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | } |
544 | 544 | } |
545 | 545 | |
546 | -if (! function_exists('partial_path')) { |
|
546 | +if (!function_exists('partial_path')) { |
|
547 | 547 | /** |
548 | 548 | * PARTIAL PATH |
549 | 549 | * |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | */ |
554 | 554 | function partial_path(string $name = ''): string |
555 | 555 | { |
556 | - if (! empty($name)) { |
|
556 | + if (!empty($name)) { |
|
557 | 557 | $name = ltrim($name, '/\\'); |
558 | 558 | } |
559 | 559 | |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | } |
562 | 562 | } |
563 | 563 | |
564 | -if (! function_exists('app_path')) { |
|
564 | +if (!function_exists('app_path')) { |
|
565 | 565 | /** |
566 | 566 | * APP PATH |
567 | 567 | * |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | */ |
572 | 572 | function app_path(string $name = ''): string |
573 | 573 | { |
574 | - if (! empty($name)) { |
|
574 | + if (!empty($name)) { |
|
575 | 575 | $name = ltrim($name, '/\\'); |
576 | 576 | } |
577 | 577 | |
@@ -579,7 +579,7 @@ discard block |
||
579 | 579 | } |
580 | 580 | } |
581 | 581 | |
582 | -if (! function_exists('cache_path')) { |
|
582 | +if (!function_exists('cache_path')) { |
|
583 | 583 | /** |
584 | 584 | * CACHE PATH |
585 | 585 | * |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | */ |
590 | 590 | function cache_path(string $name = ''): string |
591 | 591 | { |
592 | - if (! empty($name)) { |
|
592 | + if (!empty($name)) { |
|
593 | 593 | $name = ltrim($name, '/\\'); |
594 | 594 | } |
595 | 595 | |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | } |
598 | 598 | } |
599 | 599 | |
600 | -if (! function_exists('dump_path')) { |
|
600 | +if (!function_exists('dump_path')) { |
|
601 | 601 | /** |
602 | 602 | * DUMP PATH |
603 | 603 | * |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | */ |
608 | 608 | function dump_path(string $name = ''): string |
609 | 609 | { |
610 | - if (! empty($name)) { |
|
610 | + if (!empty($name)) { |
|
611 | 611 | $name = ltrim($name, '/\\'); |
612 | 612 | } |
613 | 613 | |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } |
616 | 616 | } |
617 | 617 | |
618 | -if (! function_exists('storage_path')) { |
|
618 | +if (!function_exists('storage_path')) { |
|
619 | 619 | /** |
620 | 620 | * STORAGE PATH |
621 | 621 | * |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | */ |
626 | 626 | function storage_path(string $name = ''): string |
627 | 627 | { |
628 | - if (! empty($name)) { |
|
628 | + if (!empty($name)) { |
|
629 | 629 | $name = ltrim($name, '/\\'); |
630 | 630 | } |
631 | 631 | |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | } |
634 | 634 | } |
635 | 635 | |
636 | -if (! function_exists('css_exist')) { |
|
636 | +if (!function_exists('css_exist')) { |
|
637 | 637 | /** |
638 | 638 | * CSS EXIST |
639 | 639 | * |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | } |
648 | 648 | } |
649 | 649 | |
650 | -if (! function_exists('js_exist')) { |
|
650 | +if (!function_exists('js_exist')) { |
|
651 | 651 | /** |
652 | 652 | * JS EXIST |
653 | 653 | * |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | } |
662 | 662 | } |
663 | 663 | |
664 | -if (! function_exists('lib_exist')) { |
|
664 | +if (!function_exists('lib_exist')) { |
|
665 | 665 | /** |
666 | 666 | * LIB EXIST |
667 | 667 | * |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | } |
676 | 676 | } |
677 | 677 | |
678 | -if (! function_exists('less_exist')) { |
|
678 | +if (!function_exists('less_exist')) { |
|
679 | 679 | /** |
680 | 680 | * LESS EXIST |
681 | 681 | * |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | } |
690 | 690 | } |
691 | 691 | |
692 | -if (! function_exists('img_exist')) { |
|
692 | +if (!function_exists('img_exist')) { |
|
693 | 693 | /** |
694 | 694 | * IMG EXIST |
695 | 695 | * |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | } |
704 | 704 | } |
705 | 705 | |
706 | -if (! function_exists('doc_exist')) { |
|
706 | +if (!function_exists('doc_exist')) { |
|
707 | 707 | /** |
708 | 708 | * DOC EXIST |
709 | 709 | * |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | } |
718 | 718 | } |
719 | 719 | |
720 | -if (! function_exists('video_exist')) { |
|
720 | +if (!function_exists('video_exist')) { |
|
721 | 721 | /** |
722 | 722 | * VIDEO EXIST |
723 | 723 | * |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | } |
732 | 732 | } |
733 | 733 | |
734 | -if (! function_exists('public_exist')) { |
|
734 | +if (!function_exists('public_exist')) { |
|
735 | 735 | /** |
736 | 736 | * PUBLIC EXIST |
737 | 737 | * |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | } |
746 | 746 | } |
747 | 747 | |
748 | -if (! function_exists('class_exist')) { |
|
748 | +if (!function_exists('class_exist')) { |
|
749 | 749 | /** |
750 | 750 | * CLASS EXIST |
751 | 751 | * |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | } |
760 | 760 | } |
761 | 761 | |
762 | -if (! function_exists('config_exist')) { |
|
762 | +if (!function_exists('config_exist')) { |
|
763 | 763 | /** |
764 | 764 | * CONFIG EXIST |
765 | 765 | * |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | } |
774 | 774 | } |
775 | 775 | |
776 | -if (! function_exists('controller_exist')) { |
|
776 | +if (!function_exists('controller_exist')) { |
|
777 | 777 | /** |
778 | 778 | * CONTROLLER EXIST |
779 | 779 | * |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | } |
789 | 789 | } |
790 | 790 | |
791 | -if (! function_exists('entity_exist')) { |
|
791 | +if (!function_exists('entity_exist')) { |
|
792 | 792 | /** |
793 | 793 | * ENTITY EXIST |
794 | 794 | * |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | } |
804 | 804 | } |
805 | 805 | |
806 | -if (! function_exists('helper_exist')) { |
|
806 | +if (!function_exists('helper_exist')) { |
|
807 | 807 | /** |
808 | 808 | * HELPER EXIST |
809 | 809 | * |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | } |
819 | 819 | } |
820 | 820 | |
821 | -if (! function_exists('library_exist')) { |
|
821 | +if (!function_exists('library_exist')) { |
|
822 | 822 | /** |
823 | 823 | * LIBRARY EXIST |
824 | 824 | * |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | } |
834 | 834 | } |
835 | 835 | |
836 | -if (! function_exists('middleware_exist')) { |
|
836 | +if (!function_exists('middleware_exist')) { |
|
837 | 837 | /** |
838 | 838 | * MIDDLEWARE EXIST |
839 | 839 | * |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | } |
850 | 850 | } |
851 | 851 | |
852 | -if (! function_exists('model_exist')) { |
|
852 | +if (!function_exists('model_exist')) { |
|
853 | 853 | /** |
854 | 854 | * MODEL EXIST |
855 | 855 | * |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | } |
865 | 865 | } |
866 | 866 | |
867 | -if (! function_exists('resource_exist')) { |
|
867 | +if (!function_exists('resource_exist')) { |
|
868 | 868 | /** |
869 | 869 | * RESOURCE EXIST |
870 | 870 | * |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | } |
879 | 879 | } |
880 | 880 | |
881 | -if (! function_exists('migration_exist')) { |
|
881 | +if (!function_exists('migration_exist')) { |
|
882 | 882 | /** |
883 | 883 | * MIGRATION EXIST |
884 | 884 | * |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | } |
893 | 893 | } |
894 | 894 | |
895 | -if (! function_exists('seed_exist')) { |
|
895 | +if (!function_exists('seed_exist')) { |
|
896 | 896 | /** |
897 | 897 | * SEED EXIST |
898 | 898 | * |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | } |
907 | 907 | } |
908 | 908 | |
909 | -if (! function_exists('lang_exist')) { |
|
909 | +if (!function_exists('lang_exist')) { |
|
910 | 910 | /** |
911 | 911 | * LANG EXIST |
912 | 912 | * |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | } |
922 | 922 | } |
923 | 923 | |
924 | -if (! function_exists('service_exist')) { |
|
924 | +if (!function_exists('service_exist')) { |
|
925 | 925 | /** |
926 | 926 | * SERVICE EXIST |
927 | 927 | * |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | } |
937 | 937 | } |
938 | 938 | |
939 | -if (! function_exists('view_exist')) { |
|
939 | +if (!function_exists('view_exist')) { |
|
940 | 940 | /** |
941 | 941 | * VIEW EXIST |
942 | 942 | * |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | } |
951 | 951 | } |
952 | 952 | |
953 | -if (! function_exists('layout_exist')) { |
|
953 | +if (!function_exists('layout_exist')) { |
|
954 | 954 | /** |
955 | 955 | * LAYOUT EXIST |
956 | 956 | * |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | } |
965 | 965 | } |
966 | 966 | |
967 | -if (! function_exists('partial_exist')) { |
|
967 | +if (!function_exists('partial_exist')) { |
|
968 | 968 | /** |
969 | 969 | * PARTIAL EXIST |
970 | 970 | * |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | } |
979 | 979 | } |
980 | 980 | |
981 | -if (! function_exists('app_exist')) { |
|
981 | +if (!function_exists('app_exist')) { |
|
982 | 982 | /** |
983 | 983 | * APP EXIST |
984 | 984 | * |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | } |
993 | 993 | } |
994 | 994 | |
995 | -if (! function_exists('cache_exist')) { |
|
995 | +if (!function_exists('cache_exist')) { |
|
996 | 996 | /** |
997 | 997 | * CACHE EXIST |
998 | 998 | * |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | } |
1007 | 1007 | } |
1008 | 1008 | |
1009 | -if (! function_exists('dump_exist')) { |
|
1009 | +if (!function_exists('dump_exist')) { |
|
1010 | 1010 | /** |
1011 | 1011 | * DUMP EXIST |
1012 | 1012 | * |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | } |
1021 | 1021 | } |
1022 | 1022 | |
1023 | -if (! function_exists('storage_exist')) { |
|
1023 | +if (!function_exists('storage_exist')) { |
|
1024 | 1024 | /** |
1025 | 1025 | * STORAGE EXIST |
1026 | 1026 | * |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | } |
1035 | 1035 | } |
1036 | 1036 | |
1037 | -if (! function_exists('include_config')) { |
|
1037 | +if (!function_exists('include_config')) { |
|
1038 | 1038 | /** |
1039 | 1039 | * INCLUDE CONFIG |
1040 | 1040 | * |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | } |
1053 | 1053 | } |
1054 | 1054 | |
1055 | -if (! function_exists('include_controller')) { |
|
1055 | +if (!function_exists('include_controller')) { |
|
1056 | 1056 | /** |
1057 | 1057 | * INCLUDE CONTROLLER |
1058 | 1058 | * |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | } |
1072 | 1072 | } |
1073 | 1073 | |
1074 | -if (! function_exists('include_class')) { |
|
1074 | +if (!function_exists('include_class')) { |
|
1075 | 1075 | /** |
1076 | 1076 | * INCLUDE CLASS |
1077 | 1077 | * |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | } |
1090 | 1090 | } |
1091 | 1091 | |
1092 | -if (! function_exists('include_entity')) { |
|
1092 | +if (!function_exists('include_entity')) { |
|
1093 | 1093 | /** |
1094 | 1094 | * INCLUDE ENTITY |
1095 | 1095 | * |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | } |
1109 | 1109 | } |
1110 | 1110 | |
1111 | -if (! function_exists('include_helper')) { |
|
1111 | +if (!function_exists('include_helper')) { |
|
1112 | 1112 | /** |
1113 | 1113 | * INCLUDE HELPER |
1114 | 1114 | * |
@@ -1126,7 +1126,7 @@ discard block |
||
1126 | 1126 | } |
1127 | 1127 | } |
1128 | 1128 | |
1129 | -if (! function_exists('include_library')) { |
|
1129 | +if (!function_exists('include_library')) { |
|
1130 | 1130 | /** |
1131 | 1131 | * INCLUDE LIBRARY |
1132 | 1132 | * |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | } |
1146 | 1146 | } |
1147 | 1147 | |
1148 | -if (! function_exists('include_middleware')) { |
|
1148 | +if (!function_exists('include_middleware')) { |
|
1149 | 1149 | /** |
1150 | 1150 | * INCLUDE MIDDLEWARE |
1151 | 1151 | * |
@@ -1165,7 +1165,7 @@ discard block |
||
1165 | 1165 | } |
1166 | 1166 | } |
1167 | 1167 | |
1168 | -if (! function_exists('include_model')) { |
|
1168 | +if (!function_exists('include_model')) { |
|
1169 | 1169 | /** |
1170 | 1170 | * INCLUDE MODEL |
1171 | 1171 | * |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | } |
1185 | 1185 | } |
1186 | 1186 | |
1187 | -if (! function_exists('include_resource')) { |
|
1187 | +if (!function_exists('include_resource')) { |
|
1188 | 1188 | /** |
1189 | 1189 | * INCLUDE RESOURCE |
1190 | 1190 | * |
@@ -1202,7 +1202,7 @@ discard block |
||
1202 | 1202 | } |
1203 | 1203 | } |
1204 | 1204 | |
1205 | -if (! function_exists('include_service')) { |
|
1205 | +if (!function_exists('include_service')) { |
|
1206 | 1206 | /** |
1207 | 1207 | * INCLUDE SERVICE |
1208 | 1208 | * |
@@ -1221,7 +1221,7 @@ discard block |
||
1221 | 1221 | } |
1222 | 1222 | } |
1223 | 1223 | |
1224 | -if (! function_exists('include_view')) { |
|
1224 | +if (!function_exists('include_view')) { |
|
1225 | 1225 | /** |
1226 | 1226 | * INCLUDE VIEW |
1227 | 1227 | * |
@@ -1239,7 +1239,7 @@ discard block |
||
1239 | 1239 | } |
1240 | 1240 | } |
1241 | 1241 | |
1242 | -if (! function_exists('include_layout')) { |
|
1242 | +if (!function_exists('include_layout')) { |
|
1243 | 1243 | /** |
1244 | 1244 | * INCLUDE LAYOUT |
1245 | 1245 | * |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | } |
1258 | 1258 | } |
1259 | 1259 | |
1260 | -if (! function_exists('include_partial')) { |
|
1260 | +if (!function_exists('include_partial')) { |
|
1261 | 1261 | /** |
1262 | 1262 | * INCLUDE PARTIAL |
1263 | 1263 | * |
@@ -1275,7 +1275,7 @@ discard block |
||
1275 | 1275 | } |
1276 | 1276 | } |
1277 | 1277 | |
1278 | -if (! function_exists('_include_path')) { |
|
1278 | +if (!function_exists('_include_path')) { |
|
1279 | 1279 | /** |
1280 | 1280 | * inclus un fichier |
1281 | 1281 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function exists(string $key): bool |
63 | 63 | { |
64 | - if (! $this->configurator->exists($key)) { |
|
64 | + if (!$this->configurator->exists($key)) { |
|
65 | 65 | $config = explode('.', $key); |
66 | 66 | $this->load($config[0]); |
67 | 67 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function missing(string $key): bool |
86 | 86 | { |
87 | - return ! $this->exists($key); |
|
87 | + return !$this->exists($key); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -167,18 +167,18 @@ discard block |
||
167 | 167 | } |
168 | 168 | $this->load($conf, $file, null, $allow_empty); |
169 | 169 | } |
170 | - } elseif (! isset(self::$loaded[$config])) { |
|
170 | + } elseif (!isset(self::$loaded[$config])) { |
|
171 | 171 | $file ??= self::path($config); |
172 | 172 | $schema ??= self::schema($config); |
173 | 173 | |
174 | 174 | $configurations = []; |
175 | - if (file_exists($file) && ! in_array($file, get_included_files(), true)) { |
|
175 | + if (file_exists($file) && !in_array($file, get_included_files(), true)) { |
|
176 | 176 | $configurations = (array) require $file; |
177 | 177 | } |
178 | 178 | |
179 | 179 | $configurations = Arr::merge(self::$registrars[$config] ?? [], $configurations); |
180 | 180 | |
181 | - if (empty($configurations) && ! $allow_empty && (empty($schema) || ! is_a($schema, Schema::class))) { |
|
181 | + if (empty($configurations) && !$allow_empty && (empty($schema) || !is_a($schema, Schema::class))) { |
|
182 | 182 | return; |
183 | 183 | } |
184 | 184 | |
@@ -279,14 +279,14 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | $class = new ReflectionClass($classname); |
282 | - $methods = $class->getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC); |
|
282 | + $methods = $class->getMethods(ReflectionMethod::IS_STATIC|ReflectionMethod::IS_PUBLIC); |
|
283 | 283 | |
284 | 284 | foreach ($methods as $method) { |
285 | - if (! ($method->isPublic() && $method->isStatic())) { |
|
285 | + if (!($method->isPublic() && $method->isStatic())) { |
|
286 | 286 | continue; |
287 | 287 | } |
288 | 288 | |
289 | - if (! is_array($result = $method->invoke(null))) { |
|
289 | + if (!is_array($result = $method->invoke(null))) { |
|
290 | 290 | continue; |
291 | 291 | } |
292 | 292 | |
@@ -355,12 +355,12 @@ discard block |
||
355 | 355 | { |
356 | 356 | $config = $this->get('app.show_debugbar', 'auto'); |
357 | 357 | |
358 | - if (! in_array($config, ['auto', true, false], true)) { |
|
358 | + if (!in_array($config, ['auto', true, false], true)) { |
|
359 | 359 | self::exceptBadConfigValue('show_debugbar', ['auto', true, false], 'app'); |
360 | 360 | } |
361 | 361 | |
362 | 362 | if ($config === 'auto') { |
363 | - $this->set('app.show_debugbar', ! is_online()); |
|
363 | + $this->set('app.show_debugbar', !is_online()); |
|
364 | 364 | } |
365 | 365 | } |
366 | 366 |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | |
271 | 271 | $route = $this->routes->reverseRoute($action, ...$parameters); |
272 | 272 | |
273 | - if (! $route) { |
|
273 | + if (!$route) { |
|
274 | 274 | throw RouterException::actionNotDefined($action); |
275 | 275 | } |
276 | 276 | |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | */ |
342 | 342 | public function isValidUrl(string $path): bool |
343 | 343 | { |
344 | - if (! preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) { |
|
344 | + if (!preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) { |
|
345 | 345 | return filter_var($path, FILTER_VALIDATE_URL) !== false; |
346 | 346 | } |
347 | 347 |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // Toujours là ? Ensuite, nous pouvons essayer de faire correspondre l'URI avec |
159 | 159 | // Contrôleurs/répertoires, mais l'application peut ne pas |
160 | 160 | // vouloir ceci, comme dans le cas des API. |
161 | - if (! $this->collection->shouldAutoRoute()) { |
|
161 | + if (!$this->collection->shouldAutoRoute()) { |
|
162 | 162 | throw new PageNotFoundException("Impossible de trouver une route pour '{$this->collection->getHTTPVerb()}: {$uri}'."); |
163 | 163 | } |
164 | 164 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function controllerName() |
190 | 190 | { |
191 | - if (! is_string($this->controller)) { |
|
191 | + if (!is_string($this->controller)) { |
|
192 | 192 | return $this->controller; |
193 | 193 | } |
194 | 194 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | return [ |
235 | 235 | $routeArray[0], // Controller |
236 | - $routeArray[1] ?? 'index', // Method |
|
236 | + $routeArray[1] ?? 'index', // Method |
|
237 | 237 | ]; |
238 | 238 | } |
239 | 239 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | // Cette route est-elle censée rediriger vers une autre ? |
358 | 358 | if ($this->collection->isRedirect($routeKey)) { |
359 | 359 | // remplacement des groupes de routes correspondants par des références : post/([0-9]+) -> post/$1 |
360 | - $redirectTo = preg_replace_callback('/(\([^\(]+\))/', static function () { |
|
360 | + $redirectTo = preg_replace_callback('/(\([^\(]+\))/', static function() { |
|
361 | 361 | static $i = 1; |
362 | 362 | |
363 | 363 | return '$' . $i++; |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | ); |
378 | 378 | |
379 | 379 | if ($this->collection->shouldUseSupportedLocalesOnly() |
380 | - && ! in_array($matched['locale'], config('app.supported_locales'), true)) { |
|
380 | + && !in_array($matched['locale'], config('app.supported_locales'), true)) { |
|
381 | 381 | // Lancer une exception pour empêcher l'autorouteur, |
382 | 382 | // si activé, essayer de trouver une route |
383 | 383 | throw PageNotFoundException::localeNotSupported($matched['locale']); |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | |
390 | 390 | // Utilisons-nous Closures ? Si tel est le cas, nous devons collecter les paramètres dans un tableau |
391 | 391 | // afin qu'ils puissent être transmis ultérieurement à la méthode du contrôleur. |
392 | - if (! is_string($handler) && is_callable($handler)) { |
|
392 | + if (!is_string($handler) && is_callable($handler)) { |
|
393 | 393 | $this->controller = $handler; |
394 | 394 | |
395 | 395 | // Supprime la chaîne d'origine du tableau matches |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | // $this->method contient déjà le nom de la méthode par défaut, |
470 | 470 | // donc ne l'écrasez pas avec le vide. |
471 | - if (! empty($method)) { |
|
471 | + if (!empty($method)) { |
|
472 | 472 | $this->setMethod($method); |
473 | 473 | } |
474 | 474 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $this->path = $path; |
36 | 36 | |
37 | 37 | foreach ($this->arguments as $argument => $value) { |
38 | - if (! is_string($argument)) { |
|
38 | + if (!is_string($argument)) { |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $options = (array) $options; |
46 | 46 | |
47 | 47 | // N'est-il pas namespaced ? on cherche le dossier en fonction du controleur |
48 | - if (! str_contains($view, '\\')) { |
|
48 | + if (!str_contains($view, '\\')) { |
|
49 | 49 | $reflection = new ReflectionClass(static::class); |
50 | 50 | ['dirname' => $dirname, 'filename' => $filename] = pathinfo($reflection->getFileName()); |
51 | 51 | $dirname = str_ireplace('Controllers', 'Views', $dirname); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $dirname = implode('Views', $parts); |
60 | 60 | $path = implode(DS, [$dirname, $filename]) . DS; |
61 | 61 | |
62 | - if (! is_dir($path)) { |
|
62 | + if (!is_dir($path)) { |
|
63 | 63 | $path = implode(DS, [$dirname]) . DS; |
64 | 64 | } |
65 | 65 | } |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $viewer->layout($this->layout); |
73 | 73 | } |
74 | 74 | |
75 | - if (! empty($this->viewDatas) && is_array($this->viewDatas)) { |
|
75 | + if (!empty($this->viewDatas) && is_array($this->viewDatas)) { |
|
76 | 76 | $viewer->addData($this->viewDatas); |
77 | 77 | } |
78 | 78 | |
79 | 79 | if (empty($data['title'])) { |
80 | - if (! is_string($controllerName = Dispatcher::getController(false))) { |
|
80 | + if (!is_string($controllerName = Dispatcher::getController(false))) { |
|
81 | 81 | $controllerName = static::class; |
82 | 82 | } |
83 | 83 | $controllerName = str_ireplace(['App\Controllers', 'Controller'], '', $controllerName); |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | |
150 | 150 | $authority = $this->host; |
151 | 151 | |
152 | - if (! empty($this->getUserInfo())) { |
|
152 | + if (!empty($this->getUserInfo())) { |
|
153 | 153 | $authority = $this->getUserInfo() . '@' . $authority; |
154 | 154 | } |
155 | 155 | |
156 | 156 | // N'ajoute pas de port s'il s'agit d'un port standard pour ce schéma |
157 | - if (! empty($this->port) && ! $ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) { |
|
157 | + if (!empty($this->port) && !$ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) { |
|
158 | 158 | $authority .= ':' . $this->port; |
159 | 159 | } |
160 | 160 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | { |
171 | 171 | $userInfo = $this->user ?: ''; |
172 | 172 | |
173 | - if ($this->showPassword === true && ! empty($this->password)) { |
|
173 | + if ($this->showPassword === true && !empty($this->password)) { |
|
174 | 174 | $userInfo .= ':' . $this->password; |
175 | 175 | } |
176 | 176 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $vars = $this->query; |
221 | 221 | |
222 | 222 | if (array_key_exists('except', $options)) { |
223 | - if (! is_array($options['except'])) { |
|
223 | + if (!is_array($options['except'])) { |
|
224 | 224 | $options['except'] = [$options['except']]; |
225 | 225 | } |
226 | 226 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | } elseif (array_key_exists('only', $options)) { |
231 | 231 | $temp = []; |
232 | 232 | |
233 | - if (! is_array($options['only'])) { |
|
233 | + if (!is_array($options['only'])) { |
|
234 | 234 | $options['only'] = [$options['only']]; |
235 | 235 | } |
236 | 236 | |
@@ -344,11 +344,11 @@ discard block |
||
344 | 344 | public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string |
345 | 345 | { |
346 | 346 | $uri = ''; |
347 | - if (! empty($scheme)) { |
|
347 | + if (!empty($scheme)) { |
|
348 | 348 | $uri .= $scheme . '://'; |
349 | 349 | } |
350 | 350 | |
351 | - if (! empty($authority)) { |
|
351 | + if (!empty($authority)) { |
|
352 | 352 | $uri .= $authority; |
353 | 353 | } |
354 | 354 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | { |
377 | 377 | $parts = parse_url($str); |
378 | 378 | |
379 | - if (! isset($parts['path'])) { |
|
379 | + if (!isset($parts['path'])) { |
|
380 | 380 | $parts['path'] = $this->getPath(); |
381 | 381 | } |
382 | 382 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | // Ne peut pas avoir de début ? |
552 | - if (! empty($query) && str_starts_with($query, '?')) { |
|
552 | + if (!empty($query) && str_starts_with($query, '?')) { |
|
553 | 553 | $query = substr($query, 1); |
554 | 554 | } |
555 | 555 | |
@@ -625,7 +625,7 @@ discard block |
||
625 | 625 | $temp = []; |
626 | 626 | |
627 | 627 | foreach ($this->query as $key => $value) { |
628 | - if (! in_array($key, $params, true)) { |
|
628 | + if (!in_array($key, $params, true)) { |
|
629 | 629 | continue; |
630 | 630 | } |
631 | 631 | |
@@ -700,19 +700,19 @@ discard block |
||
700 | 700 | */ |
701 | 701 | protected function applyParts(array $parts) |
702 | 702 | { |
703 | - if (! empty($parts['host'])) { |
|
703 | + if (!empty($parts['host'])) { |
|
704 | 704 | $this->host = $parts['host']; |
705 | 705 | } |
706 | - if (! empty($parts['user'])) { |
|
706 | + if (!empty($parts['user'])) { |
|
707 | 707 | $this->user = $parts['user']; |
708 | 708 | } |
709 | - if (! empty($parts['path'])) { |
|
709 | + if (!empty($parts['path'])) { |
|
710 | 710 | $this->path = $this->filterPath($parts['path']); |
711 | 711 | } |
712 | - if (! empty($parts['query'])) { |
|
712 | + if (!empty($parts['query'])) { |
|
713 | 713 | $this->setQuery($parts['query']); |
714 | 714 | } |
715 | - if (! empty($parts['fragment'])) { |
|
715 | + if (!empty($parts['fragment'])) { |
|
716 | 716 | $this->fragment = $parts['fragment']; |
717 | 717 | } |
718 | 718 | |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | $transformed = clone $relative; |
761 | 761 | |
762 | 762 | // 5.2.2 Transformer les références dans une méthode non stricte (pas de schéma) |
763 | - if (! empty($relative->getAuthority())) { |
|
763 | + if (!empty($relative->getAuthority())) { |
|
764 | 764 | $transformed->setAuthority($relative->getAuthority()) |
765 | 765 | ->setPath($relative->getPath()) |
766 | 766 | ->setQuery($relative->getQuery()); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | */ |
801 | 801 | protected function mergePaths(self $base, self $reference): string |
802 | 802 | { |
803 | - if (! empty($base->getAuthority()) && '' === $base->getPath()) { |
|
803 | + if (!empty($base->getAuthority()) && '' === $base->getPath()) { |
|
804 | 804 | return '/' . ltrim($reference->getPath(), '/ '); |
805 | 805 | } |
806 | 806 | |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | $basePath = trim($baseUri->getPath(), '/') . '/'; |
884 | 884 | $trimPath = ltrim($path, '/'); |
885 | 885 | |
886 | - if ($basePath !== '/' && ! str_starts_with($trimPath, $basePath)) { |
|
886 | + if ($basePath !== '/' && !str_starts_with($trimPath, $basePath)) { |
|
887 | 887 | $path = $basePath . $trimPath; |
888 | 888 | } |
889 | 889 |
@@ -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 DE FORMULAIRE ================================= // |
421 | 421 | |
422 | -if (! function_exists('csrf_token')) { |
|
422 | +if (!function_exists('csrf_token')) { |
|
423 | 423 | /** |
424 | 424 | * Renvoie la valeur de hachage actuelle pour la protection CSRF. |
425 | 425 | * Peut être utilisé dans les vues lors de la construction manuelle d'input cachées, ou utilisé dans les variables javascript pour l'utilisation de l'API. |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | } |
431 | 431 | } |
432 | 432 | |
433 | -if (! function_exists('csrf_field')) { |
|
433 | +if (!function_exists('csrf_field')) { |
|
434 | 434 | /** |
435 | 435 | * Génère un champ input caché à utiliser dans les formulaires générés manuellement. |
436 | 436 | */ |
@@ -438,11 +438,11 @@ discard block |
||
438 | 438 | { |
439 | 439 | $name = config('security.csrf_token_name', '_token'); |
440 | 440 | |
441 | - return '<input type="hidden"' . (! empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" value="' . csrf_token() . '">'; |
|
441 | + return '<input type="hidden"' . (!empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" value="' . csrf_token() . '">'; |
|
442 | 442 | } |
443 | 443 | } |
444 | 444 | |
445 | -if (! function_exists('csrf_meta')) { |
|
445 | +if (!function_exists('csrf_meta')) { |
|
446 | 446 | /** |
447 | 447 | * Génère une balise méta à utiliser dans les appels javascript. |
448 | 448 | */ |
@@ -450,11 +450,11 @@ discard block |
||
450 | 450 | { |
451 | 451 | $name = config('security.csrf_header_name', 'X-CSRF-TOKEN'); |
452 | 452 | |
453 | - return '<meta' . (! empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" content="' . csrf_token() . '">'; |
|
453 | + return '<meta' . (!empty($id) ? ' id="' . esc($id, 'attr') . '"' : '') . ' name="' . $name . '" content="' . csrf_token() . '">'; |
|
454 | 454 | } |
455 | 455 | } |
456 | 456 | |
457 | -if (! function_exists('method_field')) { |
|
457 | +if (!function_exists('method_field')) { |
|
458 | 458 | /** |
459 | 459 | * Générer un champ de formulaire pour usurper le verbe HTTP utilisé par les formulaires. |
460 | 460 | */ |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | |
467 | 467 | // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= // |
468 | 468 | |
469 | -if (! function_exists('environment')) { |
|
469 | +if (!function_exists('environment')) { |
|
470 | 470 | /** |
471 | 471 | * Renvoi l'environnement d'execution actuel ou determine si on est dans un environnement specifie |
472 | 472 | * |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | } |
505 | 505 | } |
506 | 506 | |
507 | -if (! function_exists('on_dev')) { |
|
507 | +if (!function_exists('on_dev')) { |
|
508 | 508 | /** |
509 | 509 | * Testez pour voir si nous sommes dans un environnement de développement. |
510 | 510 | */ |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | } |
519 | 519 | } |
520 | 520 | |
521 | -if (! function_exists('on_prod')) { |
|
521 | +if (!function_exists('on_prod')) { |
|
522 | 522 | /** |
523 | 523 | * Testez pour voir si nous sommes dans un environnement de production. |
524 | 524 | */ |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | } |
533 | 533 | } |
534 | 534 | |
535 | -if (! function_exists('on_test')) { |
|
535 | +if (!function_exists('on_test')) { |
|
536 | 536 | /** |
537 | 537 | * Testez pour voir si nous sommes dans un environnement de test |
538 | 538 | */ |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | } |
543 | 543 | } |
544 | 544 | |
545 | -if (! function_exists('is_cli')) { |
|
545 | +if (!function_exists('is_cli')) { |
|
546 | 546 | /** |
547 | 547 | * Testez pour voir si une demande a été faite à partir de la ligne de commande. |
548 | 548 | */ |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | } |
553 | 553 | } |
554 | 554 | |
555 | -if (! function_exists('is_php')) { |
|
555 | +if (!function_exists('is_php')) { |
|
556 | 556 | /** |
557 | 557 | * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie. |
558 | 558 | */ |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | } |
563 | 563 | } |
564 | 564 | |
565 | -if (! function_exists('is_windows')) { |
|
565 | +if (!function_exists('is_windows')) { |
|
566 | 566 | /** |
567 | 567 | * Déterminez si l'environnement actuel est basé sur Windows. |
568 | 568 | */ |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | } |
573 | 573 | } |
574 | 574 | |
575 | -if (! function_exists('is_https')) { |
|
575 | +if (!function_exists('is_https')) { |
|
576 | 576 | /** |
577 | 577 | * Determines if the application is accessed via an encrypted * (HTTPS) connection. |
578 | 578 | */ |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | } |
583 | 583 | } |
584 | 584 | |
585 | -if (! function_exists('is_localfile')) { |
|
585 | +if (!function_exists('is_localfile')) { |
|
586 | 586 | /** |
587 | 587 | * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non |
588 | 588 | */ |
@@ -592,11 +592,11 @@ discard block |
||
592 | 592 | return true; |
593 | 593 | } |
594 | 594 | |
595 | - return ! preg_match('#^(https?://)#i', $name); |
|
595 | + return !preg_match('#^(https?://)#i', $name); |
|
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
599 | -if (! function_exists('is_online')) { |
|
599 | +if (!function_exists('is_online')) { |
|
600 | 600 | /** |
601 | 601 | * Tester si l'application s'exécute en local ou en ligne. |
602 | 602 | */ |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | } |
607 | 607 | } |
608 | 608 | |
609 | -if (! function_exists('is_connected')) { |
|
609 | +if (!function_exists('is_connected')) { |
|
610 | 610 | /** |
611 | 611 | * Verifie si l'utilisateur a une connexion internet active. |
612 | 612 | */ |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | } |
617 | 617 | } |
618 | 618 | |
619 | -if (! function_exists('is_ajax_request')) { |
|
619 | +if (!function_exists('is_ajax_request')) { |
|
620 | 620 | /** |
621 | 621 | * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH. |
622 | 622 | */ |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | } |
627 | 627 | } |
628 | 628 | |
629 | -if (! function_exists('redirection')) { |
|
629 | +if (!function_exists('redirection')) { |
|
630 | 630 | /** |
631 | 631 | * Redirige l'utilisateur |
632 | 632 | */ |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | } |
641 | 641 | } |
642 | 642 | |
643 | -if (! function_exists('redirect')) { |
|
643 | +if (!function_exists('redirect')) { |
|
644 | 644 | /** |
645 | 645 | * Méthode pratique qui fonctionne avec la $request globale actuelle et |
646 | 646 | * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | { |
655 | 655 | $redirection = Services::redirection(); |
656 | 656 | |
657 | - if (! empty($uri)) { |
|
657 | + if (!empty($uri)) { |
|
658 | 658 | return $redirection->route($uri); |
659 | 659 | } |
660 | 660 | |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | } |
663 | 663 | } |
664 | 664 | |
665 | -if (! function_exists('back')) { |
|
665 | +if (!function_exists('back')) { |
|
666 | 666 | /** |
667 | 667 | * Retourne a la page precedente |
668 | 668 | * |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | } |
675 | 675 | } |
676 | 676 | |
677 | -if (! function_exists('link_to')) { |
|
677 | +if (!function_exists('link_to')) { |
|
678 | 678 | /** |
679 | 679 | * Étant donné une chaîne de contrôleur/méthode et tous les paramètres, |
680 | 680 | * tentera de créer l'URL relative à la route correspondante. |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | } |
695 | 695 | } |
696 | 696 | |
697 | -if (! function_exists('clean_path')) { |
|
697 | +if (!function_exists('clean_path')) { |
|
698 | 698 | /** |
699 | 699 | * Une méthode pratique pour nettoyer les chemins pour |
700 | 700 | * une sortie plus belle. Utile pour les exceptions |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | } |
727 | 727 | } |
728 | 728 | |
729 | -if (! function_exists('old')) { |
|
729 | +if (!function_exists('old')) { |
|
730 | 730 | /** |
731 | 731 | * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput(). |
732 | 732 | * |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | function old(string $key, $default = null, $escape = 'html') |
740 | 740 | { |
741 | 741 | // Assurez-vous de charger la session |
742 | - if (session_status() === PHP_SESSION_NONE && ! on_test()) { |
|
742 | + if (session_status() === PHP_SESSION_NONE && !on_test()) { |
|
743 | 743 | session(); // @codeCoverageIgnore |
744 | 744 | } |
745 | 745 | |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | |
755 | 755 | // ================================= FONCTIONS DE DEBOGAGE ================================= // |
756 | 756 | |
757 | -if (! function_exists('deprecationWarning')) { |
|
757 | +if (!function_exists('deprecationWarning')) { |
|
758 | 758 | /** |
759 | 759 | * Méthode d'assistance pour générer des avertissements d'obsolescence |
760 | 760 | * |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | } |
771 | 771 | } |
772 | 772 | |
773 | -if (! function_exists('pr')) { |
|
773 | +if (!function_exists('pr')) { |
|
774 | 774 | /** |
775 | 775 | * print_r() convenience function. |
776 | 776 | * |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | } |
793 | 793 | } |
794 | 794 | |
795 | -if (! function_exists('pj')) { |
|
795 | +if (!function_exists('pj')) { |
|
796 | 796 | /** |
797 | 797 | * json pretty print convenience function. |
798 | 798 | * |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | } |
814 | 814 | } |
815 | 815 | |
816 | -if (! function_exists('trigger_warning')) { |
|
816 | +if (!function_exists('trigger_warning')) { |
|
817 | 817 | /** |
818 | 818 | * Déclenche un E_USER_WARNING. |
819 | 819 | */ |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | |
826 | 826 | // ================================= FONCTIONS DIVERSES ================================= // |
827 | 827 | |
828 | -if (! function_exists('force_https')) { |
|
828 | +if (!function_exists('force_https')) { |
|
829 | 829 | /** |
830 | 830 | * Utilisé pour forcer l'accès à une page via HTTPS. |
831 | 831 | * Utilise une redirection standard, plus définira l'en-tête HSTS |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | |
853 | 853 | // Si la session est active, nous devons régénérer |
854 | 854 | // l'ID de session pour des raisons de sécurité. |
855 | - if (! on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
855 | + if (!on_test() && session_status() === PHP_SESSION_ACTIVE) { |
|
856 | 856 | Services::session()->regenerate(); // @codeCoverageIgnore |
857 | 857 | } |
858 | 858 | |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | } |
869 | 869 | } |
870 | 870 | |
871 | -if (! function_exists('get_type_name')) { |
|
871 | +if (!function_exists('get_type_name')) { |
|
872 | 872 | /** |
873 | 873 | * Renvoie la classe d'objets ou le type var de ce n'est pas un objet |
874 | 874 | * |
@@ -882,7 +882,7 @@ discard block |
||
882 | 882 | } |
883 | 883 | } |
884 | 884 | |
885 | -if (! function_exists('ip_address')) { |
|
885 | +if (!function_exists('ip_address')) { |
|
886 | 886 | /** |
887 | 887 | * Renvoie l'adresse IP de l'utilisateur actuel |
888 | 888 | */ |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | } |
893 | 893 | } |
894 | 894 | |
895 | -if (! function_exists('is_really_writable')) { |
|
895 | +if (!function_exists('is_really_writable')) { |
|
896 | 896 | /** |
897 | 897 | * Tests d'inscriptibilité des fichiers |
898 | 898 | */ |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | } |
903 | 903 | } |
904 | 904 | |
905 | -if (! function_exists('lang')) { |
|
905 | +if (!function_exists('lang')) { |
|
906 | 906 | /** |
907 | 907 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
908 | 908 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | } |
914 | 914 | } |
915 | 915 | |
916 | -if (! function_exists('__')) { |
|
916 | +if (!function_exists('__')) { |
|
917 | 917 | /** |
918 | 918 | * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater |
919 | 919 | * le résultat avec le MessageFormatter de l'extension intl. |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | } |
927 | 927 | } |
928 | 928 | |
929 | -if (! function_exists('namespace_split')) { |
|
929 | +if (!function_exists('namespace_split')) { |
|
930 | 930 | /** |
931 | 931 | * Séparez l'espace de noms du nom de classe. |
932 | 932 | * |
@@ -947,7 +947,7 @@ discard block |
||
947 | 947 | } |
948 | 948 | } |
949 | 949 | |
950 | -if (! function_exists('view_exist')) { |
|
950 | +if (!function_exists('view_exist')) { |
|
951 | 951 | /** |
952 | 952 | * Verifie si un fichier de vue existe. Utile pour limiter les failles include |
953 | 953 | */ |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | } |
958 | 958 | } |
959 | 959 | |
960 | -if (! function_exists('view')) { |
|
960 | +if (!function_exists('view')) { |
|
961 | 961 | /** |
962 | 962 | * Charge une vue |
963 | 963 | * |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | } |
970 | 970 | } |
971 | 971 | |
972 | -if (! function_exists('flash')) { |
|
972 | +if (!function_exists('flash')) { |
|
973 | 973 | /** |
974 | 974 | * Fournisseur d'acces rapide a la classe PHP Flash |
975 | 975 | * |
@@ -1001,7 +1001,7 @@ discard block |
||
1001 | 1001 | }*/ |
1002 | 1002 | } |
1003 | 1003 | |
1004 | -if (! function_exists('geo_ip')) { |
|
1004 | +if (!function_exists('geo_ip')) { |
|
1005 | 1005 | /** |
1006 | 1006 | * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip |
1007 | 1007 | */ |
@@ -1011,7 +1011,7 @@ discard block |
||
1011 | 1011 | } |
1012 | 1012 | } |
1013 | 1013 | |
1014 | -if (! function_exists('to_stream')) { |
|
1014 | +if (!function_exists('to_stream')) { |
|
1015 | 1015 | /** |
1016 | 1016 | * Créez un nouveau flux basé sur le type d'entrée. |
1017 | 1017 | * |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | } |
1033 | 1033 | } |
1034 | 1034 | |
1035 | -if (! function_exists('value')) { |
|
1035 | +if (!function_exists('value')) { |
|
1036 | 1036 | /** |
1037 | 1037 | * Renvoie la valeur par défaut de la valeur donnée. |
1038 | 1038 | */ |
@@ -1042,7 +1042,7 @@ discard block |
||
1042 | 1042 | } |
1043 | 1043 | } |
1044 | 1044 | |
1045 | -if (! function_exists('collect')) { |
|
1045 | +if (!function_exists('collect')) { |
|
1046 | 1046 | /** |
1047 | 1047 | * Créez une collection à partir de la valeur donnée. |
1048 | 1048 | */ |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | } |
1053 | 1053 | } |
1054 | 1054 | |
1055 | -if (! function_exists('with')) { |
|
1055 | +if (!function_exists('with')) { |
|
1056 | 1056 | /** |
1057 | 1057 | * Renvoie la valeur donnée, éventuellement transmise via le rappel donné. |
1058 | 1058 | * |
@@ -1064,7 +1064,7 @@ discard block |
||
1064 | 1064 | } |
1065 | 1065 | } |
1066 | 1066 | |
1067 | -if (! function_exists('tap')) { |
|
1067 | +if (!function_exists('tap')) { |
|
1068 | 1068 | /** |
1069 | 1069 | * Appelez la Closure donnée avec cette instance puis renvoyez l'instance. |
1070 | 1070 | */ |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | } |
1075 | 1075 | } |
1076 | 1076 | |
1077 | -if (! function_exists('last')) { |
|
1077 | +if (!function_exists('last')) { |
|
1078 | 1078 | /** |
1079 | 1079 | * Recupere le dernier element d'un tableau |
1080 | 1080 | */ |
@@ -1084,7 +1084,7 @@ discard block |
||
1084 | 1084 | } |
1085 | 1085 | } |
1086 | 1086 | |
1087 | -if (! function_exists('invade')) { |
|
1087 | +if (!function_exists('invade')) { |
|
1088 | 1088 | /** |
1089 | 1089 | * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet. |
1090 | 1090 | * Il vous permettra également de définir, obtenir et appeler des méthodes privées. |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // Enregistrer les variables actuelles |
122 | 122 | $renderVars = $this->renderVars; |
123 | 123 | |
124 | - $output = (function (): string { |
|
124 | + $output = (function(): string { |
|
125 | 125 | extract($this->tempData); |
126 | 126 | ob_start(); |
127 | 127 | include $this->renderVars['file']; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']); |
144 | 144 | |
145 | - if (($this->debug && (! isset($options['debug']) || $options['debug'] === true))) { |
|
145 | + if (($this->debug && (!isset($options['debug']) || $options['debug'] === true))) { |
|
146 | 146 | if (in_array(ViewsCollector::class, config('toolbar.collectors'), true)) { |
147 | 147 | // Nettoyer nos noms de chemins pour les rendre un peu plus propres |
148 | 148 | $this->renderVars['file'] = clean_path($this->renderVars['file']); |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $saveData ??= $this->saveData; |
179 | 179 | $this->prepareTemplateData($saveData); |
180 | 180 | |
181 | - $output = (function (string $view): string { |
|
181 | + $output = (function(string $view): string { |
|
182 | 182 | extract($this->tempData); |
183 | 183 | ob_start(); |
184 | 184 | eval('?>' . $view); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $section = array_pop($this->sectionStack); |
322 | 322 | |
323 | 323 | // Assurez-vous qu'un tableau existe afin que nous puissions stocker plusieurs entrées pour cela. |
324 | - if (! array_key_exists($section, $this->sections)) { |
|
324 | + if (!array_key_exists($section, $this->sections)) { |
|
325 | 325 | $this->sections[$section] = []; |
326 | 326 | } |
327 | 327 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | */ |
358 | 358 | public function show(string $sectionName, bool $preserve = false) |
359 | 359 | { |
360 | - if (! isset($this->sections[$sectionName])) { |
|
360 | + if (!isset($this->sections[$sectionName])) { |
|
361 | 361 | echo ''; |
362 | 362 | |
363 | 363 | return; |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * |
401 | 401 | * @alias self::insert() |
402 | 402 | */ |
403 | - public function include(string $view, ?array $data = [], ?array $options = null, ?bool $saveData = null): string |
|
403 | + public function include(string $view, ?array $data = [], ?array $options = null, ?bool $saveData = null) : string |
|
404 | 404 | { |
405 | 405 | return $this->insert($view, $data, $options, $saveData); |
406 | 406 | } |
@@ -629,11 +629,11 @@ discard block |
||
629 | 629 | */ |
630 | 630 | public function stylesBundle(): void |
631 | 631 | { |
632 | - if (! empty($this->_lib_styles)) { |
|
632 | + if (!empty($this->_lib_styles)) { |
|
633 | 633 | lib_styles(array_unique($this->_lib_styles)); |
634 | 634 | } |
635 | 635 | |
636 | - if (! empty($this->_styles)) { |
|
636 | + if (!empty($this->_styles)) { |
|
637 | 637 | styles(array_unique($this->_styles)); |
638 | 638 | } |
639 | 639 | |
@@ -665,11 +665,11 @@ discard block |
||
665 | 665 | */ |
666 | 666 | public function scriptsBundle(): void |
667 | 667 | { |
668 | - if (! empty($this->_lib_scripts)) { |
|
668 | + if (!empty($this->_lib_scripts)) { |
|
669 | 669 | lib_scripts(array_unique($this->_lib_scripts)); |
670 | 670 | } |
671 | 671 | |
672 | - if (! empty($this->_scripts)) { |
|
672 | + if (!empty($this->_scripts)) { |
|
673 | 673 | scripts(array_unique($this->_scripts)); |
674 | 674 | } |
675 | 675 |