extensions/felixfbecker.php-intellisense-0.0.12/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Sniffs/Functions/GlobalFunctionSniff.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 (empty($tokens[$stackPtr]['conditions']) === true) {
            $functionName = $phpcsFile->getDeclarationName($stackPtr);
            if ($functionName === null) {
                return;
            }
            if ($functionName !== '__autoload') {
                $error = 'Consider putting global function "%s" in a static class';
                $data  = array($functionName);
                $phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
            }
        }
    }
public function process ( File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; if ( empty ( $ tokens [ $ stackPtr ] [ 'conditions' ] ) === true ) { $ functionName = $ phpcsFile -> getDeclarationName ( $ stackPtr ) ; if ( $ functionName === null ) { return ; } if ( $ functionName !== '__autoload' ) { $ error = 'Consider putting global function "%s" in a static class' ; $ data = array ( $ functionName ) ; $ phpcsFile -> addWarning ( $ error , $ stackPtr , 'Found' , $ data ) ; } } }
Processes this test, when one of its tokens is encountered.
Processes this test when one of its tokens is encountered .
// Special exception for __autoload as it needs to be global.