extensions/felixfbecker.php-intellisense-0.0.12/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/Commenting/FixmeSniff.php
/**
     * Processes this sniff, when one of its tokens is encountered.
     *
     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
     * @param int                  $stackPtr  The position of the current token
     *                                        in the stack passed in $tokens.
     *
     * @return void
     */
Processes this sniff, when one of its tokens is encountered.
@param PHP_CodeSniffer_File $phpcsFile The file being scanned.
@param int                  $stackPtr  The position of the current token
in the stack passed in $tokens.

@return void
Processes this sniff when one of its tokens is encountered . @param PHP_CodeSniffer_File $phpcsFile The file being scanned . @param int $stackPtr The position of the current token in the stack passed in $tokens . @return void
public function process(File $phpcsFile, $stackPtr)
    {
        $tokens = $phpcsFile->getTokens();
        $content = $tokens[$stackPtr]['content'];
        $matches = array();
        preg_match('/(?:\A|[^\p{L}]+)fixme([^\p{L}]+(.*)|\Z)/ui', $content, $matches);
        if (empty($matches) === false) {
            $type         = 'CommentFound';
            $fixmeMessage = trim($matches[1]);
            $fixmeMessage = trim($fixmeMessage, '-:[](). ');
            $error        = 'Comment refers to a FIXME task';
            $data         = array($fixmeMessage);
            if ($fixmeMessage !== '') {
                $type   = 'TaskFound';
                $error .= ' "%s"';
            }
            $phpcsFile->addError($error, $stackPtr, $type, $data);
        }
    }
public function process ( File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; $ content = $ tokens [ $ stackPtr ] [ 'content' ] ; $ matches = array ( ) ; preg_match ( '/(?:\A|[^\p{L}]+)fixme([^\p{L}]+(.*)|\Z)/ui' , $ content , $ matches ) ; if ( empty ( $ matches ) === false ) { $ type = 'CommentFound' ; $ fixmeMessage = trim ( $ matches [ 1 ] ) ; $ fixmeMessage = trim ( $ fixmeMessage , '-:[](). ' ) ; $ error = 'Comment refers to a FIXME task' ; $ data = array ( $ fixmeMessage ) ; if ( $ fixmeMessage !== '' ) { $ type = 'TaskFound' ; $ error .= ' "%s"' ; } $ phpcsFile -> addError ( $ error , $ stackPtr , $ type , $ data ) ; } }
Processes this sniff, when one of its tokens is encountered.
Processes this sniff when one of its tokens is encountered .
// Clear whitespace and some common characters not required at // the end of a fixme message to make the error more informative.