Skip to content

Commit b3b341f

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

File tree

3 files changed

+17
-0
lines changed

3 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ install:
1616
- sudo apt-get -y install pypy python-sphinx graphviz
1717
- composer selfupdate
1818
- travis_retry composer update --no-interaction --prefer-source
19+
- curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer.phar
1920

2021
script:
2122
- cd docs && make linkcheck && cd ..
2223
- vendor/bin/phpdoc.php -d src -t docs-api
2324
- vendor/bin/phpunit --coverage-text
25+
- if [[ `php -r "echo version_compare(PHP_VERSION, '5.3.6', '>=') && !defined('HHVM_VERSION');"` ]]; then php php-cs-fixer.phar --diff --dry-run -vv fix; fi

0 commit comments

Comments
 (0)