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
When running phpcs --standard=SlevomatCodingStandard --sniffs=SlevomatCodingStandard.ControlStructures.DisallowYodaComparison on this file, it results in an out-of-memory exception. Increasing the memory limit well beyond what should be necessary (ex. 1GB) does not help. However if an empty set of php tags is added like so:
It can now run without an out-of-memory error. However, now it reports a false positive on line 3. Attempting to fix this error automatically with phpcbf results in this code which is definitely not equivalent:
Consider the following small example php file:
When running
phpcs --standard=SlevomatCodingStandard --sniffs=SlevomatCodingStandard.ControlStructures.DisallowYodaComparison
on this file, it results in an out-of-memory exception. Increasing the memory limit well beyond what should be necessary (ex. 1GB) does not help. However if an empty set of php tags is added like so:It can now run without an out-of-memory error. However, now it reports a false positive on line 3. Attempting to fix this error automatically with
phpcbf
results in this code which is definitely not equivalent:Slevomat version: 8.15.0
PHP Version: 7.4.33
The text was updated successfully, but these errors were encountered: