Skip to content

Commit

Permalink
added thanks method
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelhamiderrahmouni committed Feb 21, 2024
1 parent 57ea664 commit 01734ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Commands/VendorKill.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public function handle()
shell_exec("rm -rf {$dir_to_delete}");
$this->info("Deleted {$dir_to_delete}");
}

$this->thanks();
}

protected function getVendorTotalSize(array $vendor_dirs): string
Expand Down Expand Up @@ -124,10 +126,17 @@ protected function showTotal(string $total_size_human, array $vendor_dirs): void
{
if (count($vendor_dirs) === 0) {
$this->info('🥳 No composer vendor directories found in this path.');
$this->thanks();
exit(0);
}

$this->components->twoColumnDetail('🥳 <fg=green;options=bold>Found ' . count($vendor_dirs) . ' vendor directories</>', '<fg=green;options=bold>' . $total_size_human . '</>');
$this->newLine();
}

private function thanks(): void
{
$this->newLine();
$this->line('💖 <fg=blue>Thanks for using VendorKill!</>');
}
}

0 comments on commit 01734ce

Please sign in to comment.