Code Duplication    Length = 4-6 lines in 3 locations

PHPCompatibility/PHPCSHelper.php 2 locations

@@ 398-403 (lines=6) @@
395
            // it's likely to be an array which might have arguments in it. This
396
            // could cause problems in our parsing below, so lets just skip to the
397
            // end of it.
398
            if (isset($tokens[$i]['parenthesis_opener']) === true) {
399
                // Don't do this if it's the close parenthesis for the method.
400
                if ($i !== $tokens[$i]['parenthesis_closer']) {
401
                    $i = ($tokens[$i]['parenthesis_closer'] + 1);
402
                }
403
            }
404
405
            if (isset($tokens[$i]['bracket_opener']) === true) {
406
                // Don't do this if it's the close parenthesis for the method.
@@ 405-410 (lines=6) @@
402
                }
403
            }
404
405
            if (isset($tokens[$i]['bracket_opener']) === true) {
406
                // Don't do this if it's the close parenthesis for the method.
407
                if ($i !== $tokens[$i]['bracket_closer']) {
408
                    $i = ($tokens[$i]['bracket_closer'] + 1);
409
                }
410
            }
411
412
            switch ($tokens[$i]['type']) {
413
                case 'T_BITWISE_AND':

PHPCompatibility/Sniff.php 1 location

@@ 1898-1901 (lines=4) @@
1895
        // the tokens of the variable variable.
1896
        for ($i = $start; $i < $end; $i++) {
1897
            // If this is a bracket token, skip to the end of the bracketed expression.
1898
            if (isset($bracketTokens[$tokens[$i]['code']], $tokens[$i]['bracket_closer'])) {
1899
                $i = $tokens[$i]['bracket_closer'];
1900
                continue;
1901
            }
1902
1903
            // If it's a blacklisted token, not within brackets, we have an error.
1904
            if (isset($tokenBlackList[$tokens[$i]['code']])) {