extensions/felixfbecker.php-intellisense-0.0.12/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/PHP/DisallowBooleanStatementSniff.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();
        if (isset($tokens[$stackPtr]['nested_parenthesis']) === true) {
            $foundOwner = false;
            foreach ($tokens[$stackPtr]['nested_parenthesis'] as $open => $close) {
                if (isset($tokens[$open]['parenthesis_owner']) === true) {
                    return;
                }
            }
        }
        $error = 'Boolean operators are not allowed outside of control structure conditions';
        $phpcsFile->addError($error, $stackPtr, 'Found');
    }
public function process ( File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; if ( isset ( $ tokens [ $ stackPtr ] [ 'nested_parenthesis' ] ) === true ) { $ foundOwner = false ; foreach ( $ tokens [ $ stackPtr ] [ 'nested_parenthesis' ] as $ open => $ close ) { if ( isset ( $ tokens [ $ open ] [ 'parenthesis_owner' ] ) === true ) { return ; } } } $ error = 'Boolean operators are not allowed outside of control structure conditions' ; $ phpcsFile -> addError ( $ error , $ stackPtr , 'Found' ) ; }
Processes this test, when one of its tokens is encountered.
Processes this test when one of its tokens is encountered .
// Any owner means we are not just a simple statement.