Skip to content

Commit 2746bcf

Browse files
committed
Add php_codesniffer
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 6f96961 commit 2746bcf

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
@@ -36,14 +36,16 @@
3636
"require-dev": {
3737
"friendsofphp/php-cs-fixer": "^2.15",
3838
"phan/phan": "^2.2",
39-
"phpunit/phpunit": "^7.2 || ^8.2"
39+
"phpunit/phpunit": "^7.2 || ^8.2",
40+
"squizlabs/php_codesniffer": "^3.5"
4041
},
4142
"config": {
4243
"sort-packages": true
4344
},
4445
"scripts": {
4546
"analyze": [
46-
"phan --color"
47+
"phan --color",
48+
"phpcs --colors -n"
4749
],
4850
"fix": [
4951
"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-color-output">
3+
<description>php-color-output</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)