Open rskuipers opened 9 years ago
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:
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?
@dennisdegreef I guess introducing the concept of "rules" would not be such a bad idea :) Good thinking Dennis, will give it some more thought :)
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