Code Duplication    Length = 3-3 lines in 2 locations

Sniff.php 2 locations

@@ 981-983 (lines=3) @@
978
        $tokens = $phpcsFile->getTokens();
979
980
        // Check for the existence of the token.
981
        if ($stackPtr === false || isset($tokens[$stackPtr]) === false) {
982
            return false;
983
        }
984
985
        if ($tokens[$stackPtr]['code'] !== T_NAMESPACE) {
986
            return false;
@@ 1124-1126 (lines=3) @@
1121
    {
1122
        $tokens = $phpcsFile->getTokens();
1123
1124
        if (isset($tokens[$stackPtr]) === false || $tokens[$stackPtr]['code'] !== T_CONST) {
1125
            return false;
1126
        }
1127
1128
        // Note: traits can not declare constants.
1129
        $validScopes = array(