From 699851954e35efddffb713ca08d43a32ab440220 Mon Sep 17 00:00:00 2001 From: Julien Rosset Date: Tue, 6 Oct 2026 18:03:31 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"CommandCall=20:=20autorise=20d=C3=A9s?= =?UTF-8?q?ormais=20le=20string-class=20de=20la=20commande"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1d90e7c45b7488884aeaf2c7a71c1f7cddf157d3. --- src/CliProgram/CommandCall/CommandCall.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/CliProgram/CommandCall/CommandCall.php b/src/CliProgram/CommandCall/CommandCall.php index be680f2..a6596c3 100644 --- a/src/CliProgram/CommandCall/CommandCall.php +++ b/src/CliProgram/CommandCall/CommandCall.php @@ -78,11 +78,9 @@ class CommandCall { * @return $this */ public function setCommandName (string|Command $commandName): self { - $this->commandName = match (true) { - $commandName instanceof Command => CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName::class), - is_a($commandName, Command::class, true) => CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName), - default => $commandName, - }; + $this->commandName = $commandName instanceof Command + ? CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName::class) + : $commandName; return $this; }