Code Duplication    Length = 9-10 lines in 2 locations

Sniffs/PHP/ForbiddenNamesAsDeclaredSniff.php 1 location

@@ 171-180 (lines=10) @@
168
169
        // Still here, so this is one of the reserved words.
170
        $version = $this->forbiddenNames[$nameLc];
171
        if ($this->supportsAbove($version) === true) {
172
            $error = "'%s' is a reserved keyword as of PHP version %s and cannot be used to name a class, interface or trait or as part of a namespace (%s)";
173
            $data  = array(
174
                $nameLc,
175
                $version,
176
                $tokens[$stackPtr]['type'],
177
            );
178
179
            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
180
        }
181
    }//end process()
182
183

Sniffs/PHP/ForbiddenNamesAsInvokedFunctionsSniff.php 1 location

@@ 140-148 (lines=9) @@
137
            $version = $this->targetedTokens[$tokenCode];
138
        }
139
140
        if ($this->supportsAbove($version)) {
141
            $error = "'%s' is a reserved keyword introduced in PHP version %s and cannot be invoked as a function (%s)";
142
            $data = array(
143
                $tokenContentLc,
144
                $version,
145
                $tokens[$stackPtr]['type'],
146
            );
147
            $phpcsFile->addError($error, $stackPtr, 'Found', $data);
148
        }
149
    }//end process()
150
151
}//end class