From 1eab1cf2913f9930de7eeb2cab4fb9c36215a949 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Wed, 28 Feb 2018 21:43:29 +0000 Subject: [PATCH] phpstan: add page (#2009) --- pages/common/phpstan.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/phpstan.md diff --git a/pages/common/phpstan.md b/pages/common/phpstan.md new file mode 100644 index 000000000..ad16dfb9e --- /dev/null +++ b/pages/common/phpstan.md @@ -0,0 +1,27 @@ +# phpstan + +> A PHP static analysis tool to discover bugs in code. + +- 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}}`