Skip to content

Commit 4c730d0

Browse files
Add CodeSniffer in readme
1 parent 31e9352 commit 4c730d0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ We have tests to make sure everything works as expected.
6565
First execute `composer install`.
6666
Then execute `vendor/bin/phpunit tests`.
6767

68+
### Coding Syntax
69+
70+
We use [squizlabs/php_codesniffer](https://packagist.org/packages/squizlabs/php_codesniffer) to maintain the code standards.
71+
Type the following to execute them:
72+
```bash
73+
# To view the code errors
74+
vendor/bin/phpcs --standard=psr2 --extensions=php --warning-severity=0 --report=full "src"
75+
76+
# OR to fix the code errors
77+
vendor/bin/phpcbf --standard=psr2 --extensions=php --warning-severity=0 --report=full "src"
78+
```
79+
> [Read documentation about the code standards](https://github.com/squizlabs/PHP_CodeSniffer/wiki)
80+
6881
## Documentation
6982

7083
The class is well documented inline. If you use a decent IDE you'll see that each method is documented with PHPDoc.

0 commit comments

Comments
 (0)