Skip to content

Commit e3c71a4

Browse files
committed
StyleCI / PHP-CS-Fixer backport
1 parent 9d4c843 commit e3c71a4

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ phpunit.xml
22
vendor
33
composer.lock
44
composer.phar
5+
.php_cs.cache

.php_cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
require_once './vendor/autoload.php';
4+
5+
use SLLH\StyleCIBridge\ConfigBridge;
6+
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
7+
8+
$header = <<<EOF
9+
This file is part of the FOSRestBundle package.
10+
11+
(c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
12+
13+
For the full copyright and license information, please view the LICENSE
14+
file that was distributed with this source code.
15+
EOF;
16+
17+
HeaderCommentFixer::setHeader($header);
18+
19+
return ConfigBridge::create()
20+
->setUsingCache(true)
21+
;

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: symfony

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"symfony/dependency-injection": "~2.3",
4242
"phpoption/phpoption": "~1.1.0",
4343
"jms/serializer": "~0.13|~1.0",
44-
"jms/serializer-bundle": "~0.12|~1.0"
44+
"jms/serializer-bundle": "~0.12|~1.0",
45+
"sllh/php-cs-fixer-styleci-bridge": "^1.3"
4546
},
4647

4748
"suggest": {

0 commit comments

Comments
 (0)