Closed
Description
Describe the bug
False positive found with the example below
Code sample
class SampleEnum
{
public final const SAMPLE_CONST = 'SAMPLE';
}
To reproduce
Steps to reproduce the behavior:
- Create a file called
SampleEnum.php
with the code sample above... - Run
phpcs SampleEnum.php ...
- See error message displayed
Visibility must be declared on all constants if your project supports PHP 7.1 or later
| | (PSR12.Properties.ConstantVisibility.NotFound)
Expected behavior
False positive. It shouldn't show a warning.
Versions (please complete the following information):
- OS: Linux
- PHP: 8.1
- PHPCS: 3.6.2
- Standard: PSR12