PHP Doc Check

(( gitHubWatchers )) (( gitHubStars )) (( gitHubForks ))

PHP Doc Check uses complexity metrics to enforce documentation conventions on non-trivial functions.

PHP Doc Check is an automated command line tool to determine which functions and methods could use some more documentation.

Complexity metrics are used to find complex functions.

You can gradually improve documenation on projects by starting with relatively high limits and slowly moving these limits down.

Installation

Install from a Composer package as a dev dependency (with Composer)

Make sure you have Composer installed.

Require it as a dev dependency:
composer require --dev niels-de-blaauw/php-doc-check
Run it:
php vendor/bin/php-doc-check

Install from a Composer package as a global CLI utility (with Composer)

Make sure you have Composer installed.

Require it as a global CLI utility:
composer global require niels-de-blaauw/php-doc-check
Run it:
php-doc-check
Make sure your global vendor binaries directory is in your $PATH environment variable. Check the Composer documentation for more information.

Install from a PHP Archive (with curl or wget)

The PHPUnit documentation has a clear manual on how to install PHARs on Windows.

If you have the Suhosin extension enabled, make sure to allow the execution of PHARs in your php.ini:
suhosin.executor.include.whitelist = phar

Locally (X.X.X)

Download it:
wget -O php-doc-check.phar https://github.com/NielsdeBlaauw/php-doc-check/releases/download/vX.X.X/php-doc-check.phar
or
curl -sSL https://github.com/NielsdeBlaauw/php-doc-check/releases/download/vX.X.X/php-doc-check.phar -o php-doc-check.phar
Use it:
php php-doc-check.phar

Globally (X.X.X)

Download it:
wget -O php-doc-check.phar https://github.com/NielsdeBlaauw/php-doc-check/releases/download/vX.X.X/php-doc-check.phar
or
curl -sSL https://github.com/NielsdeBlaauw/php-doc-check/releases/download/vX.X.X/php-doc-check.phar -o php-doc-check.phar
Install it as an executable:
chmod a+x php-doc-check.phar
sudo mv php-doc-check.phar /usr/local/bin/php-doc-check
Use it:
php-doc-check