PhpMetrics

Author(s)
Jean-François Lépine
Website
http://www.phpmetrics.org/
License
MIT License
Demo
http://www.phpmetrics.org/report/latest/index.html
GitHub
phpmetrics/PhpMetrics
Packagist
phpmetrics/phpmetrics
DockerHub
phpqa/phpmetrics

0 0 0

PhpMetrics provides software metrics about PHP project and classes.

It generates readable and accessible reports about maintainability, quality and complexity of a source code.

Installation

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 phpmetrics/phpmetrics
Run it:
phpmetrics
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 (master)
Download it:
wget -O phpmetrics.phar https://github.com/phpmetrics/PhpMetrics/blob/master/releases/phpmetrics.phar?raw=true
or
curl -sSL https://github.com/phpmetrics/PhpMetrics/blob/master/releases/phpmetrics.phar?raw=true -o phpmetrics.phar
Use it:
php phpmetrics.phar
Globally (master)
Download it:
wget -O phpmetrics.phar https://github.com/phpmetrics/PhpMetrics/blob/master/releases/phpmetrics.phar?raw=true
or
curl -sSL https://github.com/phpmetrics/PhpMetrics/blob/master/releases/phpmetrics.phar?raw=true -o phpmetrics.phar
Install it as an executable:
chmod a+x phpmetrics.phar
sudo mv phpmetrics.phar /usr/local/bin/phpmetrics
Use it:
phpmetrics
Locally (X.X.X)
Download it:
wget -O phpmetrics.phar https://github.com/phpmetrics/PhpMetrics/releases/download/vX.X.X/phpmetrics.phar
or
curl -sSL https://github.com/phpmetrics/PhpMetrics/releases/download/vX.X.X/phpmetrics.phar -o phpmetrics.phar
Use it:
php phpmetrics.phar
Globally (X.X.X)
Download it:
wget -O phpmetrics.phar https://github.com/phpmetrics/PhpMetrics/releases/download/vX.X.X/phpmetrics.phar
or
curl -sSL https://github.com/phpmetrics/PhpMetrics/releases/download/vX.X.X/phpmetrics.phar -o phpmetrics.phar
Install it as an executable:
chmod a+x phpmetrics.phar
sudo mv phpmetrics.phar /usr/local/bin/phpmetrics
Use it:
phpmetrics