@@ -95,19 +95,19 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | foreach ($contents as $i) |
| 97 | 97 | { |
| 98 | - if (is_file($directory.'/'.$i)) |
|
| 98 | + if (is_file($directory . '/' . $i)) |
|
| 99 | 99 | { |
| 100 | - $allContents[] = ($showParentPath) ? $directory.'/'.$i : $i; |
|
| 100 | + $allContents[] = ($showParentPath) ? $directory . '/' . $i : $i; |
|
| 101 | 101 | |
| 102 | - $this->buffer = $directory.'/'.$i; |
|
| 102 | + $this->buffer = $directory . '/' . $i; |
|
| 103 | 103 | call_user_func($fileCallback, $this); |
| 104 | 104 | } |
| 105 | - else if (is_dir($directory.'/'.$i)) |
|
| 105 | + else if (is_dir($directory . '/' . $i)) |
|
| 106 | 106 | { |
| 107 | - $allContents[] = ($showParentPath) ? $directory.'/'.$i : $i; |
|
| 108 | - $allContents[] = $this->getContents($directory.'/'.$i, $fileCallback, $dirCallback, null, false); |
|
| 107 | + $allContents[] = ($showParentPath) ? $directory . '/' . $i : $i; |
|
| 108 | + $allContents[] = $this->getContents($directory . '/' . $i, $fileCallback, $dirCallback, null, false); |
|
| 109 | 109 | |
| 110 | - $this->buffer = $directory.'/'.$i; |
|
| 110 | + $this->buffer = $directory . '/' . $i; |
|
| 111 | 111 | call_user_func($dirCallback, $this); |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | if (!empty($path)) |
| 203 | 203 | if (!strlen(stristr($item, $path)) > 0) |
| 204 | 204 | continue; |
| 205 | - if (strstr($item,'~') === false && $item != '.' && $item != '..') |
|
| 205 | + if (strstr($item, '~') === false && $item != '.' && $item != '..') |
|
| 206 | 206 | $filesToReturn[] = $item; |
| 207 | 207 | } |
| 208 | 208 | } |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | { |
| 340 | 340 | foreach ($files["folders"] as $folder) |
| 341 | 341 | { |
| 342 | - if (!file_exists($dest.'/'.$folder)) |
|
| 342 | + if (!file_exists($dest . '/' . $folder)) |
|
| 343 | 343 | mkdir("$dest/$folder", 0777, true); |
| 344 | 344 | } |
| 345 | 345 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | foreach ($files["files"] as $item) |
| 350 | 350 | { |
| 351 | 351 | if (!file_exists("$dest/$files")) |
| 352 | - copy($item, $dest.'/'.$item); |
|
| 352 | + copy($item, $dest . '/' . $item); |
|
| 353 | 353 | } |
| 354 | 354 | } |
| 355 | 355 | } |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | if (is_dir($dest)) |
| 360 | 360 | { |
| 361 | 361 | if (!$recursive) |
| 362 | - copy($file, $dest.'/'.$file); |
|
| 362 | + copy($file, $dest . '/' . $file); |
|
| 363 | 363 | else { |
| 364 | 364 | |
| 365 | 365 | $files = array(); |
@@ -378,14 +378,14 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | foreach ($files[1] as $item) |
| 380 | 380 | { |
| 381 | - if (!file_exists($dest.'/'.$item)) |
|
| 381 | + if (!file_exists($dest . '/' . $item)) |
|
| 382 | 382 | mkdir("$dest/$item", 0777, true); |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | foreach ($files[0] as $item) |
| 386 | 386 | { |
| 387 | 387 | if (!file_exists("$dest/$files")) |
| 388 | - copy($item, $dest.'/'.$item); |
|
| 388 | + copy($item, $dest . '/' . $item); |
|
| 389 | 389 | } |
| 390 | 390 | }); |
| 391 | 391 | } |
@@ -410,12 +410,12 @@ discard block |
||
| 410 | 410 | throw new \InvalidArgumentException("Missing first parameter"); |
| 411 | 411 | |
| 412 | 412 | if (is_dir($newfile)) |
| 413 | - $newfile .= '/'.basename($oldfile); |
|
| 413 | + $newfile .= '/' . basename($oldfile); |
|
| 414 | 414 | |
| 415 | 415 | if ($oldfile == $newfile) |
| 416 | 416 | throw new \Exception("'$oldfile' and '$newfile' are the same file"); |
| 417 | 417 | |
| 418 | - if(!rename($oldfile, $newfile)) |
|
| 418 | + if (!rename($oldfile, $newfile)) |
|
| 419 | 419 | return false; |
| 420 | 420 | |
| 421 | 421 | return true; |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | else { |
| 446 | 446 | if (!is_dir($dir)) |
| 447 | 447 | { |
| 448 | - if(!mkdir("$dir", 0777)) |
|
| 448 | + if (!mkdir("$dir", 0777)) |
|
| 449 | 449 | return false; |
| 450 | 450 | } |
| 451 | 451 | } |