TysonAndre / phan

Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Other
0 stars 0 forks source link

Add `@phan-mock-of T1` as annotation on classes #162

Open TysonAndre opened 6 years ago

TysonAndre commented 6 years ago

Warn if any method implementations in the mock are missing or incompatible.

E.g. if the default mock value is to return null, MockT1::foo() : null would be a bad substitute of T1::foo() : stdClass

Maybe add @phan-mock-return UnionType (e.g. @phan-mock-return null for Phockito)

This might be better to implement as a plugin