src/console/Command.php
private function validateName($name) {
        if (!is_string($name))    throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if ($name != trim($name)) throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (enclosing white space)');

        if (strlen($name) && !preg_match('/^[^\s:]+(:[^\s:]+)*$/', $name))
            throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (not a command name)');
        return $this;
    }
private function validateName($name) {
        if (!is_string($name))    throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if ($name != trim($name)) throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (enclosing white space)');

        if (strlen($name) && !preg_match('/^[^\s:]+(:[^\s:]+)*$/', $name))
            throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (not a command name)');
        return $this;
    }
private function validateName ( $ name ) { if ( ! is_string ( $ name ) ) throw new IllegalTypeException ( 'Illegal type of parameter $name: ' . gettype ( $ name ) ) ; if ( $ name != trim ( $ name ) ) throw new InvalidArgumentException ( 'Invalid parameter $name: "' . $ name . '" (enclosing white space)' ) ; if ( strlen ( $ name ) && ! preg_match ( '/^[^\s:]+(:[^\s:]+)*$/' , $ name ) ) throw new InvalidArgumentException ( 'Invalid parameter $name: "' . $ name . '" (not a command name)' ) ; return $ this ; }
Validate a command name.

@param  string $name

@return $this
Validate a command name .