Code Duplication    Length = 11-12 lines in 2 locations

Sniffs/PHP/ValidIntegersSniff.php 2 locations

@@ 73-84 (lines=12) @@
70
        }
71
72
        $data = array( $token['content'] );
73
        if ($this->isInvalidOctalInteger($tokens, $stackPtr) === true) {
74
            $error   = 'Invalid octal integer detected. Prior to PHP 7 this would lead to a truncated number. From PHP 7 onwards this causes a parse error. Found: %s';
75
            $isError = $this->supportsAbove('7.0');
76
77
            if ($isError === true) {
78
                $phpcsFile->addError($error, $stackPtr, 'InvalidOctalIntegerFound', $data);
79
            } else {
80
                $phpcsFile->addWarning($error, $stackPtr, 'InvalidOctalIntegerFound', $data);
81
            }
82
83
            return;
84
        }
85
86
        if ($this->isHexidecimalNumericString($tokens, $stackPtr) === true) {
87
            $error   = 'The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: %s';
@@ 86-96 (lines=11) @@
83
            return;
84
        }
85
86
        if ($this->isHexidecimalNumericString($tokens, $stackPtr) === true) {
87
            $error   = 'The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: %s';
88
            $isError = $this->supportsAbove('7.0');
89
90
            if ($isError === true) {
91
                $phpcsFile->addError($error, $stackPtr, 'HexNumericStringFound', $data);
92
            } else {
93
                $phpcsFile->addWarning($error, $stackPtr, 'HexNumericStringFound', $data);
94
            }
95
            return;
96
        }
97
98
    }//end process()
99