squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.67k stars 1.48k forks source link

PHP 8.1 | File::getMemberProperties(): handle `enum` properties same as interface properties #3577

Closed jrfnl closed 2 years ago

jrfnl commented 2 years ago

Neither enums nor interfaces support properties being declared on them.

This adjusts the File::getMemberProperties() method to handle properties declared on an enum in the same way as properties declared on an interface were already being handled.

Includes unit test.

gsherwood commented 2 years ago

Thanks