protected function isClosureStatic(File $phpcsFile, $stackPtr)
    {
        $tokens    = $phpcsFile->getTokens();
        $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true, null, true);

        return ($prevToken !== false && $tokens[$prevToken]['code'] === \T_STATIC);
    }
protected function isClosureStatic(File $phpcsFile, $stackPtr)
    {
        $tokens    = $phpcsFile->getTokens();
        $prevToken = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true, null, true);

        return ($prevToken !== false && $tokens[$prevToken]['code'] === \T_STATIC);
    }
protected function isClosureStatic ( File $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; $ prevToken = $ phpcsFile -> findPrevious ( Tokens :: $ emptyTokens , ( $ stackPtr - 1 ) , null , true , null , true ) ; return ( $ prevToken !== false && $ tokens [ $ prevToken ] [ 'code' ] === \ T_STATIC ) ; }
Check whether the closure is declared as static.

@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 bool
Check whether the closure is declared as static .