src/Tokenizer/Analyzer/CommentsAnalyzer.php
public function isHeaderComment(Tokens $tokens, $index)
    {
        if (!$tokens[$index]->isGivenKind([T_COMMENT, T_DOC_COMMENT])) {
            throw new \InvalidArgumentException('Given index must point to a comment.');
        }

        $prevIndex = $tokens->getPrevMeaningfulToken($index);

        return $tokens[$prevIndex]->isGivenKind(T_OPEN_TAG) && null !== $tokens->getNextMeaningfulToken($index);
    }
public function isHeaderComment(Tokens $tokens, $index)
    {
        if (!$tokens[$index]->isGivenKind([T_COMMENT, T_DOC_COMMENT])) {
            throw new \InvalidArgumentException('Given index must point to a comment.');
        }

        $prevIndex = $tokens->getPrevMeaningfulToken($index);

        return $tokens[$prevIndex]->isGivenKind(T_OPEN_TAG) && null !== $tokens->getNextMeaningfulToken($index);
    }
public function isHeaderComment ( Tokens $ tokens , $ index ) { if ( ! $ tokens [ $ index ] -> isGivenKind ( [ T_COMMENT , T_DOC_COMMENT ] ) ) { throw new \ InvalidArgumentException ( 'Given index must point to a comment.' ) ; } $ prevIndex = $ tokens -> getPrevMeaningfulToken ( $ index ) ; return $ tokens [ $ prevIndex ] -> isGivenKind ( T_OPEN_TAG ) && null !== $ tokens -> getNextMeaningfulToken ( $ index ) ; }
@param Tokens $tokens
@param int    $index

@return bool
@param Tokens $tokens @param int $index