Skip to content

Commit 3999772

Browse files
authored
Merge pull request #4 from eXolnet/feature/phpcs-exolnet
Use exolnet/phpcs-config for coding-style ruleset
2 parents c8f3991 + be57e0a commit 3999772

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/eXolnet
77

88
## Pull Requests
99

10-
- **[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``.
10+
- **[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``.
1111

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

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"laravelcollective/html": "^6.0"
2727
},
2828
"require-dev": {
29+
"exolnet/phpcs-config": "^2.0",
2930
"mockery/mockery": "^1.4",
3031
"orchestra/testbench": "^4.0|^5.0|^6.0",
3132
"phpunit/phpunit": "^9.3.3",
@@ -42,8 +43,8 @@
4243
}
4344
},
4445
"scripts": {
45-
"lint": "vendor/bin/phpcs -p --standard=PSR2 src tests",
46-
"lint-fix": "vendor/bin/phpcbf -p --standard=PSR2 src tests",
46+
"lint": "vendor/bin/phpcs -p -s --standard=ruleset.xml",
47+
"lint-fix": "vendor/bin/phpcbf -p --standard=ruleset.xml",
4748
"test": "vendor/bin/phpunit",
4849
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
4950
},

ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="eXolnet">
3+
<file>src</file>
4+
<file>tests</file>
5+
6+
<rule ref="vendor/exolnet/phpcs-config" />
7+
</ruleset>

0 commit comments

Comments
 (0)