public function setName($name)
    {
        if (null !== $name) {
            Assert::string($name, 'The command name must be a string or null. Got: %s');
            Assert::notEmpty($name, 'The command name must not be empty.');
            Assert::greaterThan(strlen($name), 1, sprintf('The command name should contain at least two characters. Got: "%s"', $name));
        }

        parent::setName($name);

        return $this;
    }
public function setName($name)
    {
        if (null !== $name) {
            Assert::string($name, 'The command name must be a string or null. Got: %s');
            Assert::notEmpty($name, 'The command name must not be empty.');
            Assert::greaterThan(strlen($name), 1, sprintf('The command name should contain at least two characters. Got: "%s"', $name));
        }

        parent::setName($name);

        return $this;
    }
public function setName ( $ name ) { if ( null !== $ name ) { Assert :: string ( $ name , 'The command name must be a string or null. Got: %s' ) ; Assert :: notEmpty ( $ name , 'The command name must not be empty.' ) ; Assert :: greaterThan ( strlen ( $ name ) , 1 , sprintf ( 'The command name should contain at least two characters. Got: "%s"' , $ name ) ) ; } parent :: setName ( $ name ) ; return $ this ; }
Sets the name of the command.

Contrary to the base implementation, the name of an option command must
contain at least two characters.

@param string $name The name of the command.

@return static The current instance.
Sets the name of the command .