phpfmt_stable icon indicating copy to clipboard operation
phpfmt_stable copied to clipboard

How to disable NormalizeIsNotEquals?

Open kokokurak opened this issue 8 years ago • 1 comments

Some passes seem to be used no-matter-what, one of them is NormalizeIsNotEquals.

Is there any way to have some control over these default passes? NormalizeIsNotEquals is not even documented. I'm not adding it to my config, but it's being used anyway, with and without PSR1 and PSR2 settings.

kokokurak avatar Aug 04 '17 02:08 kokokurak

NormaliseIsNotEquals will replace any <> by != when interpreted as a T_IS_NOT_EQUAL token by the Zend Engine.

Did you try disabling this pass in the package user settings (not the default one)?

"excludes":
[
	"NormalizeIsNotEquals"
]

If after doing so the <> are replaced by !== then it means that you also need to disable the StrictComparison pass which is disabled by default

MKCG avatar Dec 05 '17 23:12 MKCG