extensions/felixfbecker.php-intellisense-0.0.12/vendor/squizlabs/php_codesniffer/src/Files/File.php
/**
     * Check if the token at the specified position is a anonymous function.
     *
     * @param int $stackPtr The position of the declaration token which
     *                      declared the class, interface or function.
     *
     * @return boolean
     * @throws PHP_CodeSniffer_Exception If the specified token is not of type
     *                                   T_FUNCTION
     */
Check if the token at the specified position is a anonymous function.
@param int $stackPtr The position of the declaration token which
declared the class, interface or function.

@return boolean
@throws PHP_CodeSniffer_Exception If the specified token is not of type
T_FUNCTION
Check if the token at the specified position is a anonymous function . @param int $stackPtr The position of the declaration token which declared the class interface or function . @return boolean @throws PHP_CodeSniffer_Exception If the specified token is not of type T_FUNCTION
public function isAnonymousFunction($stackPtr)
    {
        $tokenCode = $this->tokens[$stackPtr]['code'];
        if ($tokenCode !== T_FUNCTION) {
            throw new TokenizerException('Token type is not T_FUNCTION');
        }
        if (isset($this->tokens[$stackPtr]['parenthesis_opener']) === false) {
            return false;
        }
        $name = false;
        for ($i = ($stackPtr + 1); $i < $this->numTokens; $i++) {
            if ($this->tokens[$i]['code'] === T_STRING) {
                $name = $i;
                break;
            }
        }
        if ($name === false) {
            return true;
        }
        $open = $this->tokens[$stackPtr]['parenthesis_opener'];
        if ($name > $open) {
            return true;
        }
        return false;
    }
public function isAnonymousFunction ( $ stackPtr ) { $ tokenCode = $ this -> tokens [ $ stackPtr ] [ 'code' ] ; if ( $ tokenCode !== T_FUNCTION ) { throw new TokenizerException ( 'Token type is not T_FUNCTION' ) ; } if ( isset ( $ this -> tokens [ $ stackPtr ] [ 'parenthesis_opener' ] ) === false ) { return false ; } $ name = false ; for ( $ i = ( $ stackPtr + 1 ) ; $ i < $ this -> numTokens ; $ i ++ ) { if ( $ this -> tokens [ $ i ] [ 'code' ] === T_STRING ) { $ name = $ i ; break ; } } if ( $ name === false ) { return true ; } $ open = $ this -> tokens [ $ stackPtr ] [ 'parenthesis_opener' ] ; if ( $ name > $ open ) { return true ; } return false ; }
Check if the token at the specified position is a anonymous function.
Check if the token at the specified position is a anonymous function .
// Something is not right with this function. // No name found.