src/Documentation.php
protected function getSummary(array $lines)
    {
        $summary = '';
        foreach ($lines as $line) {
            // Check for blank line
            if (!$line) {
                // If summary exists break out
                if ($summary) {
                    break;
                }
                continue;
            }

            // Check for tag
            if ($line[0] == '@') {
                break;
            }

            // Otherwise we're good for summary
            $summary .= $line . "\n";
            if (substr($line, -1) == '.') {
                break;
            }
        }

        return trim($summary);
    }
protected function getSummary(array $lines)
    {
        $summary = '';
        foreach ($lines as $line) {
            // Check for blank line
            if (!$line) {
                // If summary exists break out
                if ($summary) {
                    break;
                }
                continue;
            }

            // Check for tag
            if ($line[0] == '@') {
                break;
            }

            // Otherwise we're good for summary
            $summary .= $line . "\n";
            if (substr($line, -1) == '.') {
                break;
            }
        }

        return trim($summary);
    }
Gets the summary of a method.

Starting from the beginning of the doc block, this method extracts text
until it reaches a full stop at the end of a line, a blank line, or a
line beginning with an @ symbol.

@param string[] $lines
@return string