|
|
|
@ -78,11 +78,9 @@ class CommandCall {
|
|
|
|
* @return $this
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function setCommandName (string|Command $commandName): self {
|
|
|
|
public function setCommandName (string|Command $commandName): self {
|
|
|
|
$this->commandName = match (true) {
|
|
|
|
$this->commandName = $commandName instanceof Command
|
|
|
|
$commandName instanceof Command => CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName::class),
|
|
|
|
? CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName::class)
|
|
|
|
is_a($commandName, Command::class, true) => CliHelper::getCommandNameFromClass($commandName->getApplication(), $commandName),
|
|
|
|
: $commandName;
|
|
|
|
default => $commandName,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|