Symfony/Sniffs/Commenting/ClassCommentSniff.php
protected function processTags($phpcsFile, $stackPtr, $commentStart)
    {
        $tokens = $phpcsFile->getTokens();

        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
            $name = $tokens[$tag]['content'];

            if (in_array($name, $this->blacklist)) {
                $error = sprintf('The %s tag is not allowed.', $name);
                $phpcsFile->addError($error, $tag, 'Blacklisted');
            }
        }

        parent::processTags($phpcsFile, $stackPtr, $commentStart);
    }
protected function processTags($phpcsFile, $stackPtr, $commentStart)
    {
        $tokens = $phpcsFile->getTokens();

        foreach ($tokens[$commentStart]['comment_tags'] as $tag) {
            $name = $tokens[$tag]['content'];

            if (in_array($name, $this->blacklist)) {
                $error = sprintf('The %s tag is not allowed.', $name);
                $phpcsFile->addError($error, $tag, 'Blacklisted');
            }
        }

        parent::processTags($phpcsFile, $stackPtr, $commentStart);
    }
protected function processTags ( $ phpcsFile , $ stackPtr , $ commentStart ) { $ tokens = $ phpcsFile -> getTokens ( ) ; foreach ( $ tokens [ $ commentStart ] [ 'comment_tags' ] as $ tag ) { $ name = $ tokens [ $ tag ] [ 'content' ] ; if ( in_array ( $ name , $ this -> blacklist ) ) { $ error = sprintf ( 'The %s tag is not allowed.' , $ name ) ; $ phpcsFile -> addError ( $ error , $ tag , 'Blacklisted' ) ; } } parent :: processTags ( $ phpcsFile , $ stackPtr , $ commentStart ) ; }
Processes each tag and raise an error if there are blacklisted tags.

@param File $phpcsFile    The file where the token was found.
@param int  $stackPtr     The position of the current token
in the stack passed in $tokens.
@param int  $commentStart Position in the stack where the comment started.

@return void
Processes each tag and raise an error if there are blacklisted tags .