Code Duplication    Length = 5-7 lines in 2 locations

PHPCompatibility/Sniff.php 1 location

@@ 1598-1604 (lines=7) @@
1595
        }
1596
1597
        $next = $phpcsFile->findNext(\PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
1598
        if ($next !== false
1599
            && ($tokens[$next]['code'] === T_OPEN_PARENTHESIS
1600
                || $tokens[$next]['code'] === T_DOUBLE_COLON)
1601
        ) {
1602
            // Function call or declaration.
1603
            return false;
1604
        }
1605
1606
        // Array of tokens which if found preceding the $stackPtr indicate that a T_STRING is not a global constant.
1607
        $tokensToIgnore = array(

PHPCompatibility/Sniffs/PHP/ForbiddenNamesAsInvokedFunctionsSniff.php 1 location

@@ 145-149 (lines=5) @@
142
         *
143
         * Only needed for those keywords which we sniff out via T_STRING.
144
         */
145
        if (($tokens[$prev]['code'] === T_OBJECT_OPERATOR || $tokens[$prev]['code'] === T_DOUBLE_COLON)
146
            && $this->supportsBelow('5.6') === false
147
        ) {
148
            return;
149
        }
150
151
        // For the word catch, it is valid to have an open parenthesis
152
        // after it, but only if it is preceded by a right curly brace.