Forrest logo
back to the phpstan tool

phpstan:analyze:with-config

Analyze a directory using a configuration file.
$ phpstan analyse ${path/to/directory} --configuration ${path/to/config}
try on your machine

This is a command to run the PHPStan static analysis tool on a specific directory, using a configuration file to specify rules and settings.

  • phpstan analyse specifies that we want to analyze code using PHPStan.
  • ${path/to/directory} is the path to the directory we want to analyze. This is the code that will be scanned and checked for errors.
  • --configuration specifies that we want to use a configuration file.
  • ${path/to/config} is the path to the configuration file that specifies which rules to apply and other settings, such as which version of PHP to use.

Overall, this command is used to analyze PHP code in a specific directory and provide feedback on errors or issues through the PHPStan tool. It requires both the code directory and a configuration file to work properly.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the phpstan tool