Skip to content

Commit d5d73fb

Browse files
authored
Add php-cs-fixer to CI (#217)
1 parent 851faf0 commit d5d73fb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ before_script:
3737

3838
script:
3939
- web-push-testing-service start example -p 9012
40-
- ./vendor/bin/phpunit
40+
- composer test:unit
4141
- web-push-testing-service stop example
42-
43-
after_script:
44-
- ./vendor/bin/phpstan analyse --level max src
42+
- composer test:typing
43+
- composer test:syntax

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
}
1414
],
1515
"scripts": {
16-
"test": "./vendor/bin/phpunit --color"
16+
"test:unit": "./vendor/bin/phpunit --color",
17+
"test:typing": "./vendor/bin/phpstan analyse --level max src",
18+
"test:syntax": "./vendor/bin/php-cs-fixer fix ./src --dry-run --stop-on-violation --using-cache=no"
1719
},
1820
"require": {
1921
"php": "^7.1",
@@ -26,7 +28,8 @@
2628
},
2729
"require-dev": {
2830
"phpunit/phpunit": "^7.0",
29-
"phpstan/phpstan": "^0.11"
31+
"phpstan/phpstan": "^0.11",
32+
"friendsofphp/php-cs-fixer": "^2.14"
3033
},
3134
"autoload": {
3235
"psr-4" : {

0 commit comments

Comments
 (0)