Skip to content

Commit

Permalink
🧑‍💻 Use OptimizeClearCommand::getOptimizeClearTasks when getting `o…
Browse files Browse the repository at this point in the history
…ptimize:clear` tasks
  • Loading branch information
Log1x committed Dec 24, 2024
1 parent 540c390 commit 6b130ec
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ public function handle()
{
$this->components->info('Clearing cached bootstrap files.');

collect([
'cache' => fn () => $this->gracefulCallSilent('cache:clear') == 0,
'compiled' => fn () => $this->gracefulCallSilent('clear-compiled') == 0,
'config' => fn () => $this->gracefulCallSilent('config:clear') == 0,
'events' => fn () => $this->gracefulCallSilent('event:clear') == 0,
'routes' => fn () => $this->gracefulCallSilent('route:clear') == 0,
'views' => fn () => $this->gracefulCallSilent('view:clear') == 0,
])->each(fn ($task, $description) => $this->components->task($description, $task));
foreach ($this->getOptimizeClearTasks() as $description => $command) {
$this->components->task($description, fn () => $this->gracefulCallSilent($command) == 0);
}

$this->newLine();
}
Expand Down

0 comments on commit 6b130ec

Please sign in to comment.