public function addAlias($alias)
    {
        Assert::string($alias, 'The command alias must be a string. Got: %s');
        Assert::notEmpty($alias, 'The command alias must not be empty.');
        Assert::regex($alias, '~^[a-zA-Z0-9\-]+$~', 'The command alias should contain letters, digits and hyphens only. Got: %s');

        $this->aliases[] = $alias;

        return $this;
    }
public function addAlias($alias)
    {
        Assert::string($alias, 'The command alias must be a string. Got: %s');
        Assert::notEmpty($alias, 'The command alias must not be empty.');
        Assert::regex($alias, '~^[a-zA-Z0-9\-]+$~', 'The command alias should contain letters, digits and hyphens only. Got: %s');

        $this->aliases[] = $alias;

        return $this;
    }
public function addAlias ( $ alias ) { Assert :: string ( $ alias , 'The command alias must be a string. Got: %s' ) ; Assert :: notEmpty ( $ alias , 'The command alias must not be empty.' ) ; Assert :: regex ( $ alias , '~^[a-zA-Z0-9\-]+$~' , 'The command alias should contain letters, digits and hyphens only. Got: %s' ) ; $ this -> aliases [ ] = $ alias ; return $ this ; }
Adds an alias name.

An alias is an alternative name that can be used when calling the
command. Aliases are a useful way for migrating a command from one name
to another.

Existing alias names are preserved.

@param string $alias The alias name to add.

@return static The current instance.

@see addAliases(), setAliases(), getAlias()
Adds an alias name .