povils / phpmnd

PHP Magic Number Detector
MIT License
554 stars 46 forks source link

'0' and '1' (as strings) are considered to be magic numbers #71

Closed EvgenyOrekhov closed 6 years ago

EvgenyOrekhov commented 6 years ago

The documentation says

By default 0 and 1 are not considered to be magic numbers.

But when I use the --include-numeric-string option I get warnings for strings '0' and '1':

tests/bootstrap.php:5. Magic number: 1
  > 5| ini_set('display_errors', '1');

tests/bootstrap.php:7. Magic number: 0
  > 7| ini_set('display_startup_errors', '0');

Shouldn't '0' and '1' be considered as non-magic?

PHPMND version: b72046929c0259816cf14a18cad8a960ef09c655

povils commented 6 years ago

Hey, thanks for the issue. Yes, I agree, it should not.

povils commented 6 years ago

Solved with release 2.0.0