mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 11:47:42 +00:00
Update cheatsheets
This commit is contained in:
33
phpstan
Normal file
33
phpstan
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# phpstan
|
||||
|
||||
> A PHP static analysis tool to discover bugs in code.
|
||||
> More information: <https://github.com/phpstan/phpstan>.
|
||||
|
||||
- Analyze one or more directories:
|
||||
|
||||
`phpstan analyse {{path/to/directory1 path/to/directory2 ...}}`
|
||||
|
||||
- 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`
|
||||
Reference in New Issue
Block a user