Code Duplication    Length = 3-5 lines in 2 locations

PHPCompatibility/Sniffs/PHP/ForbiddenCallTimePassByReferenceSniff.php 1 location

@@ 187-191 (lines=5) @@
184
185
            // Make sure the variable belongs directly to this function call
186
            // and is not inside a nested function call or array.
187
            if (isset($tokens[$nextVariable]['nested_parenthesis']) === false
188
                || (count($tokens[$nextVariable]['nested_parenthesis']) !== $nestingLevel)
189
            ) {
190
                continue;
191
            }
192
193
            // Checking this: $value = my_function(...[*]$arg...).
194
            $tokenBefore = $phpcsFile->findPrevious(

PHPCompatibility/Sniffs/PHP/NewConstantScalarExpressionsSniff.php 1 location

@@ 555-557 (lines=3) @@
552
        if ($tokens[$endPtr]['code'] === T_COMMA) {
553
            // Check if a comma is at the nesting level we're targetting.
554
            $nestingLevel = 0;
555
            if (isset($tokens[$endPtr]['nested_parenthesis']) == true) {
556
                $nestingLevel = count($tokens[$endPtr]['nested_parenthesis']);
557
            }
558
            if ($nestingLevel > $targetLevel) {
559
                return $endPtr;
560
            }