You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm using the INF const in our codebase along with a case for -INF, this triggers rule Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter on the following example, which is unexpected.
Create a file called test.php with the code sample above...
Run phpcs test.php ...
See error message displayed
ERROR | [x] Expected at least 1 space after "-"; 0 found (PSR12.Operators.OperatorSpacing.NoSpaceAfter)
ERROR | [x] Expected 1 space after "-"; 0 found (Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter)
Expected behavior
space after - is not required
Versions (please complete the following information):
PHP: 8.1
PHPCS: 3.7.1
Standard: Slevomat, PSR12, Squiz
Additional context
this also conflicts with SlevomatCodingStandard.Operators.NegationOperatorSpacing.InvalidSpaceAfterMinus that correctly recognises INF as a number
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using the
INF
const in our codebase along with a case for-INF
, this triggers ruleSquiz.WhiteSpace.OperatorSpacing.NoSpaceAfter
on the following example, which is unexpected.Code sample
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior
space after
-
is not requiredVersions (please complete the following information):
Additional context
this also conflicts with
SlevomatCodingStandard.Operators.NegationOperatorSpacing.InvalidSpaceAfterMinus
that correctly recognises INF as a numberThe text was updated successfully, but these errors were encountered: