Code Duplication    Length = 3-5 lines in 3 locations

PHPCompatibility/Sniffs/PHP/NewExecutionDirectivesSniff.php 1 location

@@ 99-101 (lines=3) @@
96
97
            // Deal with PHPCS 1.x which does not set the parenthesis properly for declare statements.
98
            $openParenthesis = $phpcsFile->findNext(T_OPEN_PARENTHESIS, ($stackPtr + 1), null, false, null, true);
99
            if ($openParenthesis === false || isset($tokens[$openParenthesis]['parenthesis_closer']) === false) {
100
                return;
101
            }
102
            $closeParenthesis = $tokens[$openParenthesis]['parenthesis_closer'];
103
        }
104

PHPCompatibility/Sniffs/PHP/ForbiddenEmptyListAssignmentSniff.php 1 location

@@ 73-75 (lines=3) @@
70
            $tokens = $phpcsFile->getTokens();
71
72
            $open = $phpcsFile->findNext(T_OPEN_PARENTHESIS, $stackPtr, null, false, null, true);
73
            if ($open === false || isset($tokens[$open]['parenthesis_closer']) === false) {
74
                return;
75
            }
76
77
            $close = $tokens[$open]['parenthesis_closer'];
78
            $error = true;

PHPCompatibility/Sniffs/PHP/NewTrailingCommaSniff.php 1 location

@@ 64-68 (lines=5) @@
61
        $tokens = $phpcsFile->getTokens();
62
63
        $nextNonEmpty = $phpcsFile->findNext(\PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
64
        if ($tokens[$nextNonEmpty]['code'] !== T_OPEN_PARENTHESIS
65
            || isset($tokens[$nextNonEmpty]['parenthesis_closer']) === false
66
        ) {
67
            return;
68
        }
69
70
        if ($tokens[$stackPtr]['code'] === T_STRING) {
71
            $ignore = array(