Skip to content

Commit

Permalink
Merge pull request #4 from eXolnet/feature/phpcs-exolnet
Browse files Browse the repository at this point in the history
Use exolnet/phpcs-config for coding-style ruleset
  • Loading branch information
Gandhi11 authored Oct 12, 2021
2 parents c8f3991 + be57e0a commit 3999772
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/eXolnet

## Pull Requests

- **[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 lint`` and fix it with ``$ composer lint-fix``.
- **[PSR-12 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md)** - Check the code style with ``$ composer lint`` and fix it with ``$ composer lint-fix``.

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"laravelcollective/html": "^6.0"
},
"require-dev": {
"exolnet/phpcs-config": "^2.0",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^9.3.3",
Expand All @@ -42,8 +43,8 @@
}
},
"scripts": {
"lint": "vendor/bin/phpcs -p --standard=PSR2 src tests",
"lint-fix": "vendor/bin/phpcbf -p --standard=PSR2 src tests",
"lint": "vendor/bin/phpcs -p -s --standard=ruleset.xml",
"lint-fix": "vendor/bin/phpcbf -p --standard=ruleset.xml",
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
Expand Down
7 changes: 7 additions & 0 deletions ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<ruleset name="eXolnet">
<file>src</file>
<file>tests</file>

<rule ref="vendor/exolnet/phpcs-config" />
</ruleset>

0 comments on commit 3999772

Please sign in to comment.