tag::firstSentenceTags PHP Method

firstSentenceTags() public method

If PEAR compatibility mode is on, the first double line break also ends the first sentence. PEAR documentation advocates ommiting the period from the first sentence.
public firstSentenceTags ( $formatter ) : Tag[]
return Tag[] An array of Tags representing the first sentence of the comment
    function &firstSentenceTags($formatter)
    {
        $phpdoctor = $this->_root->phpdoctor();
        $matches = array();
        if ($phpdoctor->getOption('pearCompat')) {
            $expression = '/^(.+)(?:\\n\\n|\\.( |\\t|\\n|<\\/p>|<\\/?h[1-6]>|<hr))/sU';
            if (preg_match($expression, $this->text($formatter), $matches)) {
                if (isset($matches[2])) {
                    $return =& $this->_getInlineTags($matches[1] . '.' . $matches[2]);
                } else {
                    $return =& $this->_getInlineTags($matches[1] . '.');
                }
            } else {
                $return =& $this->_getInlineTags($this->text($formatter) . '.');
            }
        } else {
            $expression = '/^(.+)(\\.(?: |\\t|\\n|<\\/p>|<\\/?h[1-6]>|<hr)|$)/sU';
            if (preg_match($expression, $this->text($formatter), $matches)) {
                $return =& $this->_getInlineTags($matches[1] . $matches[2]);
            } else {
                $return = array(&$this);
            }
        }
        return $return;
    }