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
PHP-CS-Fixer already has plenty of good fixers to use dedicated assertions in PHPUnit when applicable. However, one glaring omission seems to be the instanceof operator.
It would be nice if the php_unit_dedicate_assert would also look at the special case of using:
I realize this is not necessarily as straightforward as the others, as it's not about using specific function, but a language construct. Additionally, there is the question of whether using SomeClass::class or "SomeClass" or 'SomeClass', but that could possibly be handled by other fixers. It might also make sense to create a separate fixer for this rather than including it in the php_unit_dedicate_assert.
Scouring through one legacy code base I was just surprised to find plenty of these tests, so it would nice to have automated way of correcting them.
The text was updated successfully, but these errors were encountered:
PHP-CS-Fixer already has plenty of good fixers to use dedicated assertions in PHPUnit when applicable. However, one glaring omission seems to be the
instanceof
operator.It would be nice if the
php_unit_dedicate_assert
would also look at the special case of using:And fix it to use the dedicated assertion instead:
I realize this is not necessarily as straightforward as the others, as it's not about using specific function, but a language construct. Additionally, there is the question of whether using
SomeClass::class
or"SomeClass"
or'SomeClass'
, but that could possibly be handled by other fixers. It might also make sense to create a separate fixer for this rather than including it in thephp_unit_dedicate_assert
.Scouring through one legacy code base I was just surprised to find plenty of these tests, so it would nice to have automated way of correcting them.
The text was updated successfully, but these errors were encountered: