Skip to content

Commit

Permalink
Linting :partyparrot:
Browse files Browse the repository at this point in the history
  • Loading branch information
bergice committed Mar 19, 2019
1 parent da9251c commit 3ecb5d6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/FilesystemSyncTaskHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function run(array $options)
}

// Remove Directories
foreach(array_reverse($this->dirsToRemove) as $dir) {
foreach (array_reverse($this->dirsToRemove) as $dir) {
if (count(glob("$dir/*")) === 0) {
rmdir($dir);
}
Expand Down Expand Up @@ -141,11 +141,11 @@ private function getFileMigrationGenerator($path)
{
$iterator = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS);

$iterator = new RecursiveCallbackFilterIterator($iterator, function($file) {
$iterator = new RecursiveCallbackFilterIterator($iterator, function ($file) {
return $this->skipFile($file);
});

foreach(new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST) as $splFileInfo) {
foreach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST) as $splFileInfo) {
yield $splFileInfo;
}
}
Expand Down Expand Up @@ -181,8 +181,7 @@ private function canSyncFileToDatabase(SplFileInfo $splFileInfo)
if ($file) {
$this->results['filesSkippedFromFilesystem']++;
return false;
}
elseif ($this->delete_broken) {
} elseif ($this->delete_broken) {
// file exists in filesystem but not DB and is in a hash folder
$path = $splFileInfo->getPath();
$parts = explode(DIRECTORY_SEPARATOR, $path);
Expand Down

0 comments on commit 3ecb5d6

Please sign in to comment.