PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer::getMatches PHP Method

getMatches() private method

Get all matches.
private getMatches ( string $line, boolean $matchCommentOnly = false ) : string[] | null
$line string
$matchCommentOnly boolean
return string[] | null
    private function getMatches($line, $matchCommentOnly = false)
    {
        if (preg_match($this->regex, $line, $matches)) {
            if (!empty($matches['tag2'])) {
                $matches['tag'] = $matches['tag2'];
                $matches['hint'] = $matches['hint2'];
            }
            return $matches;
        }
        if ($matchCommentOnly && preg_match($this->regexCommentLine, $line, $matches)) {
            $matches['tag'] = null;
            $matches['var'] = '';
            $matches['hint'] = '';
            return $matches;
        }
    }