2017 © Pedro PelĂĄez
 

library phpmetrics

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

image

phpmetrics/phpmetrics

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  • Tuesday, July 10, 2018
  • by Halleck
  • Repository
  • 78 Watchers
  • 1554 Stars
  • 777,750 Installations
  • PHP
  • 116 Dependents
  • 0 Suggesters
  • 191 Forks
  • 21 Open issues
  • 48 Versions
  • 15 % Grown

The README.md

PhpMetrics

License Build Status Latest Stable Version Slack, (*1)

Standard report, (*2)

PhpMetrics, (*3)

PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report., (*4)

Documentation | Twitter | Contributing, (*5)

br/br/, (*6)

Quick start

composer require phpmetrics/phpmetrics --dev
php ./vendor/bin/phpmetrics --report-html=myreport <folder-to-analyze>

Then open the generated ./myreport/index.html file in your browser., (*7)

Configure

Use the --config=<file>.json option. For example:, (*8)

{
    "includes": [   // directory and files to analyze, relative to config file directory 
        "src"
    ],
    "exclude": [    // regex of files (or directory) to exclude from analyze
      "tests"
    ],
    "report": {     // list of reports to generate (html, json, csv or violation)
        "html": "/tmp/report/",             // destination directory of HTML report 
        "csv": "/tmp/report.csv",           // destination file for CSV report
        "json": "/tmp/report.json",         // destination file for JSON report
        "violations": "/tmp/violations.xml" // destination file for XML violations report
    },
    "groups": [     // "layers" of code. You can group your classes and packages by regex, 
                    // to visualise specific HTML report for each of them
        {
            "name": "Component",      // name of the layer
            "match": "!component!i"   // regular expression used to match the group (based on 
                                      // the name of the fully qualified class name)
                                      // remember to double escape (for json, then for regex): 
                                      // set "!\\\\MyPackage\\\\!" if you want to capture  
                                      // expression "\MyPackage\"
        },
        {
            "name": "Example",
            "match": "!example!"
        }
    ],
    "plugins": {
        "git": {
            "binary": "git"           // if defined, runs git analyze
        },
        "junit": {
            "file": "/tmp/junit.xml"  // if defined, JUnit report file will be analyzed            
        }
    },
    "extensions": [ "php", "php8" ]   // default: ["php", "inc"]
}

More

If want, you can install PhpMetrics globally with your favorite package manager (APT, Brew...). You can also visit our documentation., (*9)

Metrics list

See the metrics file., (*10)

Author

License

See the LICENSE file., (*11)

Contributing

See the CONTRIBUTING file., (*12)

The Versions

10/07 2018

dev-master

9999999-dev http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

10/07 2018

v2.4.1

2.4.1.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

09/07 2018

v2.4.0

2.4.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

13/10 2017

v2.3.2

2.3.2.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

13/10 2017

dev-hotfix-classmetric

dev-hotfix-classmetric http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

13/10 2017

v2.3.1

2.3.1.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

13/10 2017

dev-fix-317

dev-fix-317 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

03/10 2017

dev-fix-style

dev-fix-style http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

29/09 2017

dev-fix-315

dev-fix-315 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

22/09 2017

v2.3.0

2.3.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

13/04 2017

v2.2.0

2.2.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

10/04 2017

v2.1.0

2.1.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/01 2017

v2.0.0

2.0.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/01 2017

dev-legacy-v1

dev-legacy-v1 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

28/01 2017

dev-version2_ast

dev-version2_ast http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

20/08 2016

v2.0.0-rc

2.0.0.0-RC http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

05/04 2016

v1.10.0

1.10.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

20/03 2016

v1.9.2

1.9.2.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

17/03 2016

v1.9.1

1.9.1.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

17/03 2016

v1.9.0

1.9.0.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

17/03 2016

v1.8.5

1.8.5.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

17/03 2016

v1.8.4

1.8.4.0 http://www.phpmetrics.org

Static analyzer tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

15/12 2015

v1.8.3

1.8.3.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

14/12 2015

v1.8.2

1.8.2.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

14/12 2015

v1.8.1

1.8.1.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

09/12 2015

v1.8.0

1.8.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

01/12 2015

v1.7.0

1.7.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/11 2015

v1.6.3

1.6.3.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/11 2015

v1.6.2

1.6.2.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/11 2015

v1.6.1

1.6.1.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

30/11 2015

v1.6.0

1.6.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

26/11 2015

v1.5.2

1.5.2.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

25/11 2015

v1.5.1

1.5.1.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

25/11 2015

v1.5.0

1.5.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

20/08 2015

v1.3.0

1.3.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

20/08 2015

v1.2.0

1.2.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintainability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

17/12 2014

v1.1.1

1.1.1.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

16/12 2014

v1.1.0

1.1.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

02/09 2014

v1.0.1

1.0.1.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

01/09 2014

v1.0.0

1.0.0.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

12/08 2014

v0.0.8

0.0.8.0 http://www.phpmetrics.org

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

29/07 2014

v0.0.7

0.0.7.0 http://halleck45.github.io/PhpMetrics/

Static analyzis tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

testing analysis quality qa

12/06 2014

v0.0.6

0.0.6.0

Static analyze tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

22/04 2014

v0.0.5

0.0.5.0

Static analyze tool for PHP : Coupling, Cyclomatic complexity, Maintenability Index, Halstead's metrics... and more !

  Sources   Download

MIT

The Requires

 

The Development Requires

19/02 2014

v0.0.4

0.0.4.0

POC of Halstead, Maintenability index for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

03/02 2014

v0.0.3

0.0.3.0

POC of Halstead, Maintenability index for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

30/01 2014

v0.0.2

0.0.2.0

POC of Halstead, Maintenability index for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

18/12 2013

0.0.1

0.0.1.0

POC of Halstead, Maintenability index for PHP

  Sources   Download

MIT

The Requires