getErrorOutput() : $output; } /** * Get the name of a command class * * @param Application $application The application * @param class-string $commandClass The command class * * @return string|null The command name ; Null if not found */ public static final function getCommandNameFromClass (Application $application, string $commandClass): ?string { foreach ($application->all() as $possibleCommand) { if (get_class($possibleCommand) == $commandClass) { return $possibleCommand->getName(); } } return null; } }