public static function nameEmpty(Exception $cause = null) { return new static('The command name must be set.', self::NAME_EMPTY, $cause); }
private function validateCommandName(CommandConfig $config) { $name = $config->getName(); if (!$name) { throw CannotAddCommandException::nameEmpty(); } if ($this->commands->contains($name)) { throw CannotAddCommandException::nameExists($name); } }