Code Duplication    Length = 3-3 lines in 2 locations

PHPCompatibility/Sniffs/ControlStructures/ForeachExpressionReferencingSniff.php 1 location

@@ 80-82 (lines=3) @@
77
        }
78
79
        $nestingLevel = 0;
80
        if ($asToken !== ($opener + 1) && isset($tokens[$opener + 1]['nested_parenthesis'])) {
81
            $nestingLevel = count($tokens[$opener + 1]['nested_parenthesis']);
82
        }
83
84
        if ($this->isVariable($phpcsFile, ($opener + 1), $asToken, $nestingLevel) === true) {
85
            return;

PHPCompatibility/Sniffs/PHP/EmptyNonVariableSniff.php 1 location

@@ 65-67 (lines=3) @@
62
        $close = $tokens[$open]['parenthesis_closer'];
63
64
        $nestingLevel = 0;
65
        if ($close !== ($open + 1) && isset($tokens[$open + 1]['nested_parenthesis'])) {
66
            $nestingLevel = count($tokens[$open + 1]['nested_parenthesis']);
67
        }
68
69
        if ($this->isVariable($phpcsFile, ($open + 1), $close, $nestingLevel) === true) {
70
            return;