public function setText($text)
    {
        if (!is_string($text)) {
            throw new InvalidArgumentException('string', 0);
        }

        $text = trim($text);

        if (strpos($text, '#') !== 0) {
            $text = '# ' . $text;
        }

        $this->text = $text;

        return $this;
    }
public function setText($text)
    {
        if (!is_string($text)) {
            throw new InvalidArgumentException('string', 0);
        }

        $text = trim($text);

        if (strpos($text, '#') !== 0) {
            $text = '# ' . $text;
        }

        $this->text = $text;

        return $this;
    }
public function setText ( $ text ) { if ( ! is_string ( $ text ) ) { throw new InvalidArgumentException ( 'string' , 0 ) ; } $ text = trim ( $ text ) ; if ( strpos ( $ text , '#' ) !== 0 ) { $ text = '# ' . $ text ; } $ this -> text = $ text ; return $ this ; }
Set the Comment Text

@param string $text The comment new text. A # will be prepended automatically if it isn't found at the beginning
of the string.
@return $this
@throws InvalidArgumentException
Set the Comment Text