Code Duplication    Length = 3-4 lines in 3 locations

PHPCompatibility/Sniffs/PHP/NewConstantScalarExpressionsSniff.php 1 location

@@ 332-335 (lines=4) @@
329
    {
330
        $tokens = $phpcsFile->getTokens();
331
        $next   = $phpcsFile->findNext(\PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), $end, true);
332
        if ($next === false || $tokens[$next]['code'] !== T_EQUAL) {
333
            // No value assigned.
334
            return true;
335
        }
336
337
        return $this->isStaticValue($phpcsFile, $tokens, ($next + 1), ($end - 1));
338
    }

PHPCompatibility/Sniff.php 2 locations

@@ 1764-1766 (lines=3) @@
1761
            true
1762
        );
1763
1764
        if ($nextNonEmpty !== false && $tokens[$nextNonEmpty]['code'] === T_EQUAL) {
1765
            return true;
1766
        }
1767
1768
        if ($prevNonEmpty !== false
1769
            && $tokens[$prevNonEmpty]['code'] === T_AS
@@ 1821-1823 (lines=3) @@
1818
                    true
1819
                );
1820
1821
                if ($nextNonEmpty !== false && $tokens[$nextNonEmpty]['code'] === T_EQUAL) {
1822
                    return true;
1823
                }
1824
1825
                return false;
1826
            }