phpDocumentor\Reflection\DocBlock\Tag\ParamTag::setContent PHP Method

setContent() public method

public setContent ( $content )
    public function setContent($content)
    {
        Tag::setContent($content);
        $parts = preg_split('/(\\s+)/Su', $this->description, 3, PREG_SPLIT_DELIM_CAPTURE);
        // if the first item that is encountered is not a variable; it is a type
        if (isset($parts[0]) && strlen($parts[0]) > 0 && $parts[0][0] !== '$') {
            $this->type = array_shift($parts);
            array_shift($parts);
        }
        #print_p($parts);
        // if the next item starts with a $ it must be the variable name
        if (isset($parts[0]) && strlen($parts[0]) > 0 && $parts[0][0] == '$') {
            $this->variableName = array_shift($parts);
            array_shift($parts);
        }
        $this->setDescription(implode('', $parts));
        $this->content = $content;
        return $this;
    }