Skip to content

Commit

Permalink
Renamed delete_directory_recursive function to be more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
nexxai committed Aug 9, 2023
1 parent a089c97 commit 1bd5d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Commands/MinifyApplicationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function removeIgnoredFilesAndFolders(string $appPath): void

if (file_exists($fullPath)) {
if (is_dir($fullPath)) {
$this->delete_directory($fullPath);
$this->delete_directory_recursive($fullPath);
} else {
array_map('unlink', glob($fullPath));
}
Expand All @@ -86,7 +86,7 @@ protected function removeIgnoredFilesAndFolders(string $appPath): void
}
}

private function delete_directory($dir)
private function delete_directory_recursive($dir)
{
if (! file_exists($dir)) {
return true;
Expand All @@ -101,7 +101,7 @@ private function delete_directory($dir)
continue;
}

if (! $this->delete_directory($dir.'/'.$item)) {
if (! $this->delete_directory_recursive($dir.'/'.$item)) {
return false;
}
}
Expand Down

0 comments on commit 1bd5d55

Please sign in to comment.