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
So this is an interesting case, take this for example:
if ($this->isNewObject()) {
// ...
}
I would personally not want to add the whole === true to this since the is prefix makes the intention clear enough. But it is, by definition, still an assumption that isNewObject() returns true or false.
There are some options:
Should we be strict and call this out?
Should we ignore out these boolean function checks?
Should we check for is or has prefixed in the function name?
I would say this is a matter of taste and standards and might differ from user to user.
Not everyone uses the convention of is and has, and even if they do, they might still want strict checking, since indeed, it still is an assumption.
WARNING: Feature creep alert
Would it be an idea to be able to configure your preferences?
Right now phpa doesn't take function calls into account.
For example:
The above isn't detected while it's the same as:
Same goes for other (userland) function calls
The text was updated successfully, but these errors were encountered: