Skip to content

herloct/docker-phpmetrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

license Build Status

Supported tags and respective Dockerfile links

What is PhpMetrics?

PhpMetrics is a static analysis tool for PHP. It provides tons of metrics:

  • Complexity: Cyclomatic complexity, Myer's interval, Relative system complexity
  • Volume: Vocabulary, Data complexity, Lines of code, Readability...
  • Object Oriented: Lack of cohesion of methods, Coupling, Abstraction...
  • Maintainability: Maintainability index, Halstead's metrics, Effort...
  • And more !

http://www.phpmetrics.org/

How to use this image

Basic usage using current user.

docker run --rm \
    --user $(id -u):$(id -g) \
    --volume /local/path:/project \
    herloct/phpmetrics[:tag] [<options>]

For example, to generate metrics of our src directory.

docker run --rm \
    --user $(id -u):$(id -g) \
    --volume /local/path:/project \
    herloct/phpmetrics --report-html=build/metrics src

Volumes

  • /project: Your PHP project directory.