Unverified Commit ece56b49 authored byBrowse files
PHP 8.1 | ForbiddenNames: detect reserved keywords used as name for an enum
As enums are a new type of OO structure, this means that reserved keywords are not allowed to be used as a name for these structures. This updates the `ForbiddenNames` sniff to start sniffing enum declarations for forbidden names as well. Includes: * Adding `enum` and `backed-enum` cases to the test case file generator to allow for auto-generating the test case files. * Adding the actual (generated) test case files. * Handling a very very specific tokenizer edge case, which I don't think PHPCS should need to account for. * Adding an additional test case to the `ForbiddenNamesUnitTest.2.inc` file to cover a specific condition in the code to handle the tokenizer edge case.