Code Duplication    Length = 5-7 lines in 2 locations

PHPCompatibility/Sniffs/PHP/ForbiddenCallTimePassByReferenceSniff.php 1 location

@@ 125-129 (lines=5) @@
122
            true
123
        );
124
125
        if ($openBracket === false || $tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS
126
            || isset($tokens[$openBracket]['parenthesis_closer']) === false
127
        ) {
128
            return;
129
        }
130
131
        // Get the function call parameters.
132
        $parameters = $this->getFunctionCallParameters($phpcsFile, $stackPtr);

PHPCompatibility/Sniffs/Lists/NewKeyedListSniff.php 1 location

@@ 79-85 (lines=7) @@
76
77
        if ($tokens[$stackPtr]['code'] === T_LIST) {
78
            $nextNonEmpty = $phpcsFile->findNext(\PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
79
            if ($nextNonEmpty === false
80
                || $tokens[$nextNonEmpty]['code'] !== T_OPEN_PARENTHESIS
81
                || isset($tokens[$nextNonEmpty]['parenthesis_closer']) === false
82
            ) {
83
                // Parse error or live coding.
84
                return;
85
            }
86
87
            $opener = $nextNonEmpty;
88
            $closer = $tokens[$nextNonEmpty]['parenthesis_closer'];