Skip to content

Commit 94f2ffe

Browse files
committed
Depend on wdes/coding-standard
1 parent 35f6a59 commit 94f2ffe

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
.github export-ignore
33
.gitattributes export-ignore
44
.gitignore export-ignore
5+
.editorconfig export-ignore
6+
phpcs.xml.dist export-ignore
57
phpstan.neon.dist export-ignore
68
phpstan-baseline.neon export-ignore

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
}
3333
],
3434
"scripts": {
35-
"test": "phpunit",
36-
"phpstan": "phpstan analyse",
37-
"phpcs": "echo 'Not implemented for now';",
38-
"phpcbf": "echo 'Not implemented for now';"
35+
"test": "./vendor/bin/phpunit",
36+
"phpstan": "./vendor/bin/phpstan",
37+
"phpcs": "./vendor/bin/phpcs",
38+
"phpcbf": "./vendor/bin/phpcbf"
3939
},
4040
"require": {
4141
"php": "^7.1 || ^8.0",
@@ -44,7 +44,8 @@
4444
},
4545
"require-dev": {
4646
"phpunit/phpunit": "^7 || ^8 || ^9",
47-
"phpstan/phpstan": "^0.12"
47+
"phpstan/phpstan": "^0.12",
48+
"wdes/coding-standard": "^3.0"
4849
},
4950
"autoload": {
5051
"psr-4": {

phpcs.xml.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
3+
4+
<!-- Show progress and sniff codes -->
5+
<arg value="ps"/>
6+
<arg name="colors"/>
7+
<!-- Make sniff report relative -->
8+
<arg name="basepath" value="."/>
9+
10+
<file>.</file>
11+
<exclude-pattern>*/tmp/*</exclude-pattern>
12+
<exclude-pattern>*/vendor/*</exclude-pattern>
13+
<exclude-pattern>*/build/*</exclude-pattern>
14+
15+
<rule ref="Wdes">
16+
</rule>
17+
<rule ref="Generic.Files.LineLength.TooLong">
18+
<severity>0</severity>
19+
</rule>
20+
<rule ref="Generic.PHP.NoSilencedErrors.Discouraged">
21+
<severity>0</severity>
22+
</rule>
23+
</ruleset>

0 commit comments

Comments
 (0)