Skip to content

Commit 0ac76e1

Browse files
committed
run PHP CS Fixer on Travis
1 parent 99e30b0 commit 0ac76e1

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!/bin/validate-json
44
coverage
55
.buildpath
6+
.php_cs.cache
67
.project
78
.settings
89
composer.lock

.php_cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
use Symfony\CS\Config\Config;
4+
use Symfony\CS\FixerInterface;
5+
6+
$config = Config::create()
7+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
8+
->setUsingCache(true)
9+
->setUsingLinter(false);
10+
11+
$finder = $config->getFinder()
12+
->in(__DIR__);
13+
14+
return $config;

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ script:
2121
- cd docs && make linkcheck && cd ..
2222
- vendor/bin/phpdoc.php -d src -t docs-api
2323
- vendor/bin/phpunit --coverage-text
24+
- vendor/bin/php-cs-fixer fix --dry-run --diff --verbose

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
},
4141
"require-dev": {
4242
"json-schema/JSON-Schema-Test-Suite": "1.1.0",
43+
"fabpot/php-cs-fixer": "~1.6",
4344
"phpunit/phpunit": "~3.7",
4445
"phpdocumentor/phpdocumentor": "~2"
4546
},

0 commit comments

Comments
 (0)