Language: PHP
Checks: 80
Categories: Bug Risk
Phan Version: 1.2.7; *Phan 4.0.6 available in beta channel

Phan is a Static analyzer for PHP by the creators of PHP.

Enable the Plugin

To enable Phan analysis, add the following to your .codeclimate.yml configuration file:

plugins:
  phan:
    enabled: true
    config:
      file_extensions: "php"

More information about the CLI is available in the README here: https://github.com/codeclimate/codeclimate

Configure the Plugin

You can configure various flags for the engine using your .codeclimate.yml file.

minimum-severity - the minimum severity that the engine should report issues for. Default is 0.
ignore-undeclared - ignore the undeclared checks this code. Default is false.
quick - run the engine in quick mode. Default is false.
backward-compatibility-checks - run backward compatibility checks. Default is false.
dead-code-detection - perform dead code detection. Default is false.

Using Phan's newer versions

Phan 4.0.6 is available by specifying the "beta" channel in your .codeclimate.yml, as seen below:

plugins:
  phan:
    enabled: true
    channel: "beta"

Understand the Plugin

For more information about all the checks available and their configuration options please check out the documentation here: https://github.com/phan/phan