1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-31 00:17:56 +01:00
tldr/pages/common/phpstan.md
2019-05-31 19:47:40 +01:00

28 lines
793 B
Markdown

# phpstan
> A PHP static analysis tool to discover bugs in code.
> More information: <https://github.com/phpstan/phpstan>.
- Display available options for analysis:
`phpstan analyse --help`
- Analyse the specified space-separated directories:
`phpstan analyse {{path/to/directory}}`
- Analyse a directory using a configuration file:
`phpstan analyse {{path/to/directory}} --configuration {{path/to/config}}`
- Analyse using a specific rule level (0-7, higher is stricter):
`phpstan analyse {{path/to/directory}} --level {{level}}`
- Specify an autoload file to load before analysing:
`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}}`