diff --git a/src/Application.php b/src/Application.php index 6fe7df4..0d766fc 100644 --- a/src/Application.php +++ b/src/Application.php @@ -385,6 +385,6 @@ public function getDefault() throw new LogicException('Mono-command applications need at least 1 command defined'); } - return $commands[0]->getName(); + return current($commands)->getName(); } }