extensions/felixfbecker.php-intellisense-0.0.12/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php
/**
     * Processes this test, 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 test, 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 test 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();
        $token  = $tokens[$stackPtr];
        if (isset($token['scope_opener']) === false) {
            return;
        }
        $next = $phpcsFile->findNext(
            Tokens::$emptyTokens,
            ($token['scope_opener'] + 1),
            ($token['scope_closer'] - 1),
            true
        );
        if ($next !== false) {
            return;
        }
        $name  = strtoupper($token['content']);
        $error = 'Empty %s statement detected';
        $phpcsFile->addError($error, $stackPtr, 'Detected'.$name, array($name));
    }
public function process ( File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; $ token = $ tokens [ $ stackPtr ] ; if ( isset ( $ token [ 'scope_opener' ] ) === false ) { return ; } $ next = $ phpcsFile -> findNext ( Tokens :: $ emptyTokens , ( $ token [ 'scope_opener' ] + 1 ) , ( $ token [ 'scope_closer' ] - 1 ) , true ) ; if ( $ next !== false ) { return ; } $ name = strtoupper ( $ token [ 'content' ] ) ; $ error = 'Empty %s statement detected' ; $ phpcsFile -> addError ( $ error , $ stackPtr , 'Detected' . $ name , array ( $ name ) ) ; }
Processes this test, when one of its tokens is encountered.
Processes this test when one of its tokens is encountered .
// Skip statements without a body. // Get token identifier.