argument('limit'); // Validate the limit argument if ($limit !== 'full' && ! is_numeric($limit)) { $this->error('Limit must be "full" or a numeric value.'); return 1; } // Build the arguments array for NameFixingService $argv = [ 'match_prefiles.php', $limit, ]; if ($this->option('show')) { $argv[] = 'show'; } try { $nameFixingService = new NameFixingService; $nameFixingService->getPreFileNames($argv); return 0; } catch (Exception $e) { $this->error($e->getMessage()); return 1; } } }