Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
povils committed Apr 20, 2017
1 parent 9b81c69 commit ce6fe2e
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit ce6fe2e

Please sign in to comment.