From ce6fe2ea7de3a3cae7a230f15bdad270d2f69e96 Mon Sep 17 00:00:00 2001 From: Povilas Susinskas Date: Fri, 21 Apr 2017 00:57:31 +0100 Subject: [PATCH] Update README --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index bf1eb22..dd22c04 100644 --- a/README.md +++ b/README.md @@ -67,4 +67,47 @@ Then make sure you have the global Composer binaries directory in your ``PATH``. ## Usage Example +Basic usage: +``` +$ phpmnd wordpress --ignore-numbers=2,-1 --exclude=tests --progress --extensions=default_parameter,assign +``` + +The ``--ignore-numbers`` option will exclude numbers code analysis. + +The ``--exclude`` option will exclude a directory from code analysis (must be relative to source) (multiple values allowed) + +The ``--progress`` option will display progress bar. + +The ``--extensions`` option lets you extend code analysis (extensions must be separated by a comma): + +**By default it analyses conditions, return statements and switch cases.** + +Choose from the list of available extensions: + +* **argument** + ```php + round($number, 4); + ``` +* **array** + ```php + $array = [200, 201]; + ``` +* **assign** + ```php + $var = 10; + ``` +* **default_parameter** + ```php + function foo($default = 3); + ``` +* **operation** + ```php + $bar = $foo * 20; + ``` +* **property** + ```php + private $bar = 10; + ``` + + I would recommend clean up code using default extension before using these extensions.