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::regex($name, '~^[a-zA-Z0-9\\-]+$~', 'The command name should contain letters, digits and hyphens only. Got: %s');
}
$this->name = $name;
return $this;
}