|
|
@ -68,14 +68,14 @@ class BaseCommand extends Command {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Initialize the command
|
|
|
|
* Initialize the command
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string|null $name The command name ; Null if the default one (cf. {@see static::getDefaultName()})
|
|
|
|
* @param string|null $name The command name ; Null if the default one (cf. {@see static::getDefaultName()})
|
|
|
|
* @param string[]|null $aliases The command aliases ; Null if the default one (cf. {@see static::getDefaultAliases()})
|
|
|
|
* @param string[]|string|null $aliases The command aliases ; Null if the default one (cf. {@see static::getDefaultAliases()})
|
|
|
|
* @param string|null $description The command description ; Null if the default one (cf. {@see static::getDefaultDescription()})
|
|
|
|
* @param string|null $description The command description ; Null if the default one (cf. {@see static::getDefaultDescription()})
|
|
|
|
* @param bool|null $hidden Is the command hidden from command list ? Null if the default one (cf. {@see static::getDefaultHidden()})
|
|
|
|
* @param bool|null $hidden Is the command hidden from command list ? Null if the default one (cf. {@see static::getDefaultHidden()})
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function __construct (?string $name = null, ?array $aliases = null, ?string $description = null, ?bool $hidden = null) {
|
|
|
|
public function __construct (?string $name = null, array|string|null $aliases = null, ?string $description = null, ?bool $hidden = null) {
|
|
|
|
parent::__construct($name);
|
|
|
|
parent::__construct($name);
|
|
|
|
$this->setAliases($aliases ?? static::getDefaultAliases());
|
|
|
|
$this->setAliases(is_string($aliases) ? [$aliases] : $aliases ?? static::getDefaultAliases());
|
|
|
|
$this->setDescription($description ?? $this->getDescription());
|
|
|
|
$this->setDescription($description ?? $this->getDescription());
|
|
|
|
$this->setHidden($hidden ?? static::getDefaultHidden());
|
|
|
|
$this->setHidden($hidden ?? static::getDefaultHidden());
|
|
|
|
}
|
|
|
|
}
|
|
|
|