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 an option/script for phan to annotate source code for methods with phpdoc types #48

Open TysonAndre opened 7 years ago

TysonAndre commented 7 years ago

E.g. if phan sees that a function is passed string for $x in one place, true in another, and no param comment exists for that index already. Similar for return types.

Add the following line to the phpdoc of the method in the appropriate place (with heuristics or so on). Create a phpdoc block if it doesn't already exist.

A plugin may help

` @param string|bool $x