public/phpmyadmin/vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php
/**
     * Check if this use statement is part of the namespace block.
     *
     * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
     * @param int                         $stackPtr  The position of the current token in
     *                                               the stack passed in $tokens.
     *
     * @return void
     */
Check if this use statement is part of the namespace block.
@param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
@param int                         $stackPtr  The position of the current token in
the stack passed in $tokens.

@return void
Check if this use statement is part of the namespace block . @param \ PHP_CodeSniffer \ Files \ File $phpcsFile The file being scanned . @param int $stackPtr The position of the current token in the stack passed in $tokens . @return void
private function shouldIgnoreUse($phpcsFile, $stackPtr)
    {
        $tokens = $phpcsFile->getTokens();
        $next = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);
        if ($next === false || $tokens[$next]['code'] === T_OPEN_PARENTHESIS) {
            return true;
        }
        if ($phpcsFile->hasCondition($stackPtr, [T_CLASS, T_TRAIT]) === true) {
            return true;
        }
        return false;
    }
private function shouldIgnoreUse ( $ phpcsFile , $ stackPtr ) { $ tokens = $ phpcsFile -> getTokens ( ) ; $ next = $ phpcsFile -> findNext ( Tokens :: $ emptyTokens , ( $ stackPtr + 1 ) , null , true ) ; if ( $ next === false || $ tokens [ $ next ] [ 'code' ] === T_OPEN_PARENTHESIS ) { return true ; } if ( $ phpcsFile -> hasCondition ( $ stackPtr , [ T_CLASS , T_TRAIT ] ) === true ) { return true ; } return false ; }
Check if this use statement is part of the namespace block.
Check if this use statement is part of the namespace block .
// Ignore USE keywords inside closures and during live coding. // Ignore USE keywords for traits.