argument('repository'); if (! $repository || $repository === 'all') { if (! $this->option('force') && ! $this->confirm('Clear all repository cache?')) { $this->info('Cache clearing cancelled.'); return Command::SUCCESS; } $this->info('Clearing all repository cache...'); $this->cacheService->clearAllRepositoryCache(); $this->info('All repository cache cleared successfully.'); } else { $this->info("Clearing cache for {$repository} repository..."); $this->cacheService->clearRepositoryCache($repository); $this->info("{$repository} repository cache cleared successfully."); } return Command::SUCCESS; } }