PHPADD is abandoned docblocks detector. It can analyze a directory with PHP source code and detect (for each file, for each class, for each method) if the parameters in the function declaration are compatible with the parameters found in the docblock, reporting the outdated ones.
Docblocks may become your nightmare if left behind.
If you stop writing/updating them, your whole documentation will be inconsistent, ugly, noisy. You will continuously scroll your files searching for code, skipping useless comments. New developers may misunderstanding methods by trusting comments.
If you have valid and updated docblocks, you have (free of charge!):
- documentation for new developers;
- documentation for exsisting developers with poor memory;
- documentation for external people (for example, if you want to publish some API) via phpDocumentor or other tools;
- source code navigation in your modern IDE.
With PEAR it is very simple. On Linux, you may need to prefix each command with
pear channel-discover pear.webmatters.it pear install webmatters/phpadd
Once installed it responds to
phpadd from your console.
phpadd --publish-html /tmp/output.html directory/to/analyze
This command will produce an output like this.