Code Duplication    Length = 3-5 lines in 2 locations

PHPCompatibility/Sniffs/PHP/NewConstantScalarExpressionsSniff.php 1 location

@@ 272-274 (lines=3) @@
269
                }
270
271
                $targetNestingLevel = 0;
272
                if (isset($tokens[$stackPtr]['nested_parenthesis']) == true) {
273
                    $targetNestingLevel = count($tokens[$stackPtr]['nested_parenthesis']);
274
                }
275
276
                // Examine each variable/constant in multi-declarations.
277
                $start = $stackPtr;

PHPCompatibility/Sniff.php 1 location

@@ 1887-1891 (lines=5) @@
1884
        }
1885
1886
        // Check if the variable found is at the right level. Deeper levels are always an error.
1887
        if (isset($tokens[$hasVariable]['nested_parenthesis'])
1888
            && count($tokens[$hasVariable]['nested_parenthesis']) !== $targetNestingLevel
1889
        ) {
1890
                return false;
1891
        }
1892
1893
        // Ok, so the first variable is at the right level, now are there any
1894
        // blacklisted tokens within the empty() ?