Merge pull request #41 from ravage84/composer-phpcs
Add Composer scripts "check-codestyle" & "fix-codestyle"
This commit is contained in:
commit
d5b838777b
|
@ -7,7 +7,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/:vendor
|
|||
|
||||
## Pull Requests
|
||||
|
||||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
|
||||
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
|
||||
|
||||
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"require-dev": {
|
||||
"phpunit/phpunit" : "~4.0||~5.0",
|
||||
"scrutinizer/ocular": "~1.1",
|
||||
"squizlabs/php_codesniffer": "~2.3"
|
||||
"squizlabs/php_codesniffer": "^2.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -36,7 +36,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"test": "phpunit",
|
||||
"format": "phpcbf --standard=psr2 src/"
|
||||
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests",
|
||||
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
|
Loading…
Reference in a new issue