@@ -32,7 +32,7 @@ |
||
32 | 32 | $callback = Services::request()->getQuery('callback'); |
33 | 33 | |
34 | 34 | if (empty($callback)) { |
35 | - return json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
|
35 | + return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // Nous n'honorons qu'un rappel jsonp qui sont des identifiants javascript valides |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | public function format($data) |
27 | 27 | { |
28 | - if (! is_array($data)) { |
|
28 | + if (!is_array($data)) { |
|
29 | 29 | $data = (array) $data; |
30 | 30 | } |
31 | 31 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
72 | + if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) { |
|
73 | 73 | return null; |
74 | 74 | } |
75 | 75 |
@@ -122,7 +122,7 @@ |
||
122 | 122 | ->requireDirectory(APP_PATH, Checker::CHECK_IS_READABLE); |
123 | 123 | |
124 | 124 | $output = $checker->check(); |
125 | - if (! $checker->isSatisfied()) { |
|
125 | + if (!$checker->isSatisfied()) { |
|
126 | 126 | echo '<h3>An error encourred</h3>'; |
127 | 127 | |
128 | 128 | exit(implode('<br/> ', $checker->getErrors())); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | */ |
109 | 109 | public function timelineData(): array |
110 | 110 | { |
111 | - if (! $this->hasTimeline) { |
|
111 | + if (!$this->hasTimeline) { |
|
112 | 112 | return []; |
113 | 113 | } |
114 | 114 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | */ |
78 | 78 | protected function collectLogs() |
79 | 79 | { |
80 | - if (! empty($this->data)) { |
|
80 | + if (!empty($this->data)) { |
|
81 | 81 | return $this->data; |
82 | 82 | } |
83 | 83 |
@@ -90,7 +90,7 @@ |
||
90 | 90 | foreach (EventManager::getPerformanceLogs() as $row) { |
91 | 91 | $key = $row['event']; |
92 | 92 | |
93 | - if (! array_key_exists($key, $data['events'])) { |
|
93 | + if (!array_key_exists($key, $data['events'])) { |
|
94 | 94 | $data['events'][$key] = [ |
95 | 95 | 'event' => $key, |
96 | 96 | 'duration' => number_format(($row['end'] - $row['start']) * 1000, 2), |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | use BlitzPHP\Loader\Filesystem; |
13 | 13 | |
14 | -if (! function_exists('directory_map')) { |
|
14 | +if (!function_exists('directory_map')) { |
|
15 | 15 | /** |
16 | 16 | * Créer une carte de répertoire |
17 | 17 | * |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | |
32 | -if (! function_exists('directory_mirror')) { |
|
32 | +if (!function_exists('directory_mirror')) { |
|
33 | 33 | /** |
34 | 34 | * Copie récursivement les fichiers et répertoires du répertoire d'origine |
35 | 35 | * dans le répertoire cible, c'est-à-dire "miroir" son contenu. |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | -if (! function_exists('write_file')) { |
|
45 | +if (!function_exists('write_file')) { |
|
46 | 46 | /** |
47 | 47 | * Write File |
48 | 48 | * |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | -if (! function_exists('delete_files')) { |
|
79 | +if (!function_exists('delete_files')) { |
|
80 | 80 | /** |
81 | 81 | * Delete Files |
82 | 82 | * |
@@ -101,18 +101,18 @@ discard block |
||
101 | 101 | RecursiveIteratorIterator::CHILD_FIRST |
102 | 102 | ) as $object) { |
103 | 103 | $filename = $object->getFilename(); |
104 | - if (! $hidden && $filename[0] === '.') { |
|
104 | + if (!$hidden && $filename[0] === '.') { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | |
108 | - if (! $htdocs || ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { |
|
108 | + if (!$htdocs || !preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) { |
|
109 | 109 | $isDir = $object->isDir(); |
110 | 110 | if ($isDir && $delDir) { |
111 | 111 | rmdir($object->getPathname()); |
112 | 112 | |
113 | 113 | continue; |
114 | 114 | } |
115 | - if (! $isDir) { |
|
115 | + if (!$isDir) { |
|
116 | 116 | unlink($object->getPathname()); |
117 | 117 | } |
118 | 118 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
128 | -if (! function_exists('get_filenames')) { |
|
128 | +if (!function_exists('get_filenames')) { |
|
129 | 129 | /** |
130 | 130 | * Get Filenames |
131 | 131 | * |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | RecursiveIteratorIterator::SELF_FIRST |
155 | 155 | ) as $name => $object) { |
156 | 156 | $basename = pathinfo($name, PATHINFO_BASENAME); |
157 | - if (! $hidden && $basename[0] === '.') { |
|
157 | + if (!$hidden && $basename[0] === '.') { |
|
158 | 158 | continue; |
159 | 159 | } |
160 | 160 | |
161 | - if ($includeDir || ! $object->isDir()) { |
|
161 | + if ($includeDir || !$object->isDir()) { |
|
162 | 162 | if ($includePath === false) { |
163 | 163 | $files[] = $basename; |
164 | 164 | } elseif ($includePath === null) { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | -if (! function_exists('get_dir_file_info')) { |
|
181 | +if (!function_exists('get_dir_file_info')) { |
|
182 | 182 | /** |
183 | 183 | * Get Directory File Information |
184 | 184 | * |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
227 | -if (! function_exists('get_file_info')) { |
|
227 | +if (!function_exists('get_file_info')) { |
|
228 | 228 | /** |
229 | 229 | * Get File Info |
230 | 230 | * |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | function get_file_info(string $file, $returnedValues = ['name', 'server_path', 'size', 'date']) |
242 | 242 | { |
243 | - if (! is_file($file)) { |
|
243 | + if (!is_file($file)) { |
|
244 | 244 | return null; |
245 | 245 | } |
246 | 246 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | } |
291 | 291 | } |
292 | 292 | |
293 | -if (! function_exists('symbolic_permissions')) { |
|
293 | +if (!function_exists('symbolic_permissions')) { |
|
294 | 294 | /** |
295 | 295 | * Symbolic Permissions |
296 | 296 | * |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | } |
339 | 339 | } |
340 | 340 | |
341 | -if (! function_exists('octal_permissions')) { |
|
341 | +if (!function_exists('octal_permissions')) { |
|
342 | 342 | /** |
343 | 343 | * Octal Permissions |
344 | 344 | * |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | } |
355 | 355 | |
356 | -if (! function_exists('same_file')) { |
|
356 | +if (!function_exists('same_file')) { |
|
357 | 357 | /** |
358 | 358 | * Checks if two files both exist and have identical hashes |
359 | 359 | * |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | } |
367 | 367 | |
368 | -if (! function_exists('set_realpath')) { |
|
368 | +if (!function_exists('set_realpath')) { |
|
369 | 369 | /** |
370 | 370 | * Set Realpath |
371 | 371 | * |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | // Resolve the path |
382 | 382 | if (realpath($path) !== false) { |
383 | 383 | $path = realpath($path); |
384 | - } elseif ($checkExistence && ! is_dir($path) && ! is_file($path)) { |
|
384 | + } elseif ($checkExistence && !is_dir($path) && !is_file($path)) { |
|
385 | 385 | throw new InvalidArgumentException('Not a valid path: ' . $path); |
386 | 386 | } |
387 | 387 |
@@ -84,14 +84,14 @@ |
||
84 | 84 | $command = is_string($command) ? $command : 'command:name'; |
85 | 85 | $type = is_string($type) ? $type : 'basic'; |
86 | 86 | |
87 | - if (! in_array($type, ['basic', 'generator'], true)) { |
|
87 | + if (!in_array($type, ['basic', 'generator'], true)) { |
|
88 | 88 | // @codeCoverageIgnoreStart |
89 | 89 | $type = $this->choice(lang('CLI.generator.commandType'), ['basic', 'generator'], 'basic'); |
90 | 90 | $this->eol(); |
91 | 91 | // @codeCoverageIgnoreEnd |
92 | 92 | } |
93 | 93 | |
94 | - if (! is_string($group)) { |
|
94 | + if (!is_string($group)) { |
|
95 | 95 | $group = $type === 'generator' ? 'Generators' : 'BlitzPHP'; |
96 | 96 | } |
97 | 97 |