Closed matbour closed 4 years ago
@mathieu-bour Can you try dev-master
please?
I just tried with c1c1cd781b and this issue seems to not be relevant anymore.
Code reference: https://github.com/mathieu-bour/slevomat-negative-operator/tree/with-dev-master
Workflow: https://github.com/mathieu-bour/slevomat-negative-operator/runs/542147459
I don't know this issue should remain open tho. Close it if you feel that is necessary, I will use the commit c1c1cd781b for now!
Thanks, so it's duplicate to https://github.com/slevomat/coding-standard/issues/917
Fix will be part of next release on Monday.
Sorry for the duplicate, thank you very much for your work!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
SlevomatCodingStandard.Operators.NegationOperatorSpacing
returns a false positive when assigning a negative number like$a = -1
with propertyspacesCount
set to zero.Affected version: 6.1.5, on PHP 7.1, 7.2, 7.3, 7.4 on all OS available for GitHub Actions.
Minimal example: mathieu-bour/slevomat-negative-operator.
There is also a workflow which demonstrates the issue here: https://github.com/mathieu-bour/slevomat-negative-operator/runs/542079155
Configuration:
The output of
$ ./vendor/bin/phpcs
is the following:Which seems very strange.
Moreover, the output of
$ ./vendor/bin/phpcbf
is the following:Thus, it may be directly related to PHP_CodeSniffer itself.