@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $result = []; |
135 | 135 | |
136 | - if (! is_dir($directory)) { |
|
136 | + if (!is_dir($directory)) { |
|
137 | 137 | return []; |
138 | 138 | } |
139 | 139 | |
@@ -161,13 +161,13 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public static function getDirTimestamp(string $directory) : int |
163 | 163 | { |
164 | - $_directory = new RecursiveDirectoryIterator( |
|
164 | + $_directory = new RecursiveDirectoryIterator( |
|
165 | 165 | $directory, |
166 | 166 | FilesystemIterator::KEY_AS_PATHNAME | |
167 | 167 | FilesystemIterator::CURRENT_AS_FILEINFO | |
168 | 168 | FilesystemIterator::SKIP_DOTS |
169 | 169 | ); |
170 | - $_iterator = new RecursiveIteratorIterator( |
|
170 | + $_iterator = new RecursiveIteratorIterator( |
|
171 | 171 | $_directory, |
172 | 172 | RecursiveIteratorIterator::SELF_FIRST |
173 | 173 | ); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | public static function deleteDir(string $dirname) : bool |
313 | 313 | { |
314 | - if (! is_dir($dirname)) { |
|
314 | + if (!is_dir($dirname)) { |
|
315 | 315 | return false; |
316 | 316 | } |
317 | 317 | |
@@ -323,10 +323,10 @@ discard block |
||
323 | 323 | continue; |
324 | 324 | } |
325 | 325 | |
326 | - if (filetype($dirname . '/' . $o) === 'dir') { |
|
327 | - self::deleteDir($dirname . '/' . $o); |
|
326 | + if (filetype($dirname.'/'.$o) === 'dir') { |
|
327 | + self::deleteDir($dirname.'/'.$o); |
|
328 | 328 | } else { |
329 | - self::delete($dirname . '/' . $o); |
|
329 | + self::delete($dirname.'/'.$o); |
|
330 | 330 | } |
331 | 331 | } |
332 | 332 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | { |
350 | 350 | $umask = umask(0); |
351 | 351 | |
352 | - if (! is_dir($dirname) && ! mkdir($dirname, self::$permissions['dir'][$visibility], true)) { |
|
352 | + if (!is_dir($dirname) && !mkdir($dirname, self::$permissions['dir'][$visibility], true)) { |
|
353 | 353 | return false; |
354 | 354 | } |
355 | 355 | |
@@ -369,11 +369,11 @@ discard block |
||
369 | 369 | */ |
370 | 370 | public static function copy(string $path, string $newpath, bool $recursive = false) |
371 | 371 | { |
372 | - if (! $recursive) { |
|
372 | + if (!$recursive) { |
|
373 | 373 | return copy($path, $newpath); |
374 | 374 | } |
375 | 375 | |
376 | - if (! self::has($newpath)) { |
|
376 | + if (!self::has($newpath)) { |
|
377 | 377 | mkdir($newpath); |
378 | 378 | } |
379 | 379 | |
@@ -389,9 +389,9 @@ discard block |
||
389 | 389 | $_path = str_replace($path, '', $splFileinfo->getPathname()); |
390 | 390 | |
391 | 391 | if ($splFileinfo->isDir()) { |
392 | - mkdir($newpath . '/' . $_path); |
|
392 | + mkdir($newpath.'/'.$_path); |
|
393 | 393 | } else { |
394 | - copy($fullPath, $newpath . '/' . $_path); |
|
394 | + copy($fullPath, $newpath.'/'.$_path); |
|
395 | 395 | } |
396 | 396 | } |
397 | 397 | } |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | if ($normalized['type'] === 'file') { |
482 | 482 | $normalized['size'] = $file->getSize(); |
483 | 483 | $normalized['filename'] = $file->getFilename(); |
484 | - $normalized['basename'] = $file->getBasename('.' . $file->getExtension()); |
|
484 | + $normalized['basename'] = $file->getBasename('.'.$file->getExtension()); |
|
485 | 485 | $normalized['extension'] = $file->getExtension(); |
486 | 486 | } |
487 | 487 |