phpstan-strict-rules icon indicating copy to clipboard operation
phpstan-strict-rules copied to clipboard

Disallow use of "!"

Open steevanbarboyon opened this issue 3 years ago • 2 comments

Hi ;)

As ! don't care about the type, it should be disallowed by phpstan/strict-rules no?

steevanbarboyon avatar Jun 28 '21 10:06 steevanbarboyon

Hi, I don't know what you mean, can you post a phpstan.org example with expected output?

ondrejmirtes avatar Jun 28 '21 10:06 ondrejmirtes

This sounds unnecessarily restrictive... requiring that the operand of ! be a boolean should be more than enough.

dktapps avatar Jun 28 '21 11:06 dktapps