Skip to content

Commit fbe5570

Browse files
committed
Add php_codesniffer
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 97aaa97 commit fbe5570

File tree

3 files changed

+71
-3
lines changed

3 files changed

+71
-3
lines changed

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@
3838
"require-dev": {
3939
"friendsofphp/php-cs-fixer": "^2.15",
4040
"phan/phan": "^2.0",
41-
"phpunit/phpunit": "^7.2 || ^8.0"
41+
"phpunit/phpunit": "^7.2 || ^8.0",
42+
"squizlabs/php_codesniffer": "^3.5"
4243
},
4344
"scripts": {
4445
"analyze": [
45-
"phan --color"
46+
"phan --color",
47+
"phpcs --colors -n"
4648
],
4749
"fix": [
4850
"php-cs-fixer fix --verbose"

composer.lock

Lines changed: 52 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<ruleset name="php-array-dumper">
3+
<description>php-array-dumper</description>
4+
5+
<!-- <arg name="report" value="summary" /> -->
6+
<!-- <arg name="colors" /> -->
7+
<arg value="sp" />
8+
9+
<file>./src/</file>
10+
11+
<exclude-pattern>*/tests/*</exclude-pattern>
12+
13+
<rule ref="PSR1" />
14+
<rule ref="PSR12" />
15+
</ruleset>

0 commit comments

Comments
 (0)