Webmozart\Console\Api\Config\CommandConfig::setHelp PHP Method

setHelp() public method

The help text provides additional information about a command that is displayed in the help view.
See also: getHelp()
public setHelp ( string $help ) : static
$help string The help text of the command.
return static The current instance.
    public function setHelp($help)
    {
        if (null !== $help) {
            Assert::string($help, 'The help text must be a string or null. Got: %s');
            Assert::notEmpty($help, 'The help text must not be empty.');
        }
        $this->help = $help;
        return $this;
    }

Usage Example

示例#1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testSetHelpFailsIfNotString()
 {
     $this->config->setHelp(1234);
 }