1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 22:22:18 +02:00
tldr/pages/common/phpstan.md
Vitor Henrique 46a054215a
pages*: make help and version commands comply with the style guide (#12107)
* pages*: use generic word for help

* git: add newline to the end

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* pages*: make help and version commands comply with the style guide

* java: fix Java name

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-30 12:55:24 +08:00

793 B

phpstan

A PHP static analysis tool to discover bugs in code. More information: https://github.com/phpstan/phpstan.

  • Analyze the specified space-separated directories:

phpstan analyse {{path/to/directory}}

  • Analyze a directory using a configuration file:

phpstan analyse {{path/to/directory}} --configuration {{path/to/config}}

  • Analyze using a specific rule level (0-7, higher is stricter):

phpstan analyse {{path/to/directory}} --level {{level}}

  • Specify an autoload file to load before analyzing:

phpstan analyse {{path/to/directory}} --autoload-file {{path/to/autoload_file}}

  • Specify a memory limit during analysis:

phpstan analyse {{path/to/directory}} --memory-limit {{memory_limit}}

  • Display available options for analysis:

phpstan analyse --help