Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit eacf227

Browse files
committed
upgrade php-cs-fixer
1 parent e60258e commit eacf227

File tree

4 files changed

+244
-160
lines changed

4 files changed

+244
-160
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.bowerrc
2+
.php_cs.cache
23
bin
34
!bin/bowerphp
45
!bin/compile

.php_cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
<?php
22
// see https://github.com/FriendsOfPHP/PHP-CS-Fixer
33

4-
$finder = Symfony\CS\Finder\DefaultFinder::create()
4+
$finder = PhpCsFixer\Finder::create()
55
->in([__DIR__ . '/src', __DIR__ . '/tests'])
66
;
77

8-
return Symfony\CS\Config\Config::create()
9-
->fixers(['concat_with_spaces', 'align_double_arrow', 'short_array_syntax', '-concat_without_spaces', 'ordered_use', 'unused_use', '-phpdoc_short_description', '-phpdoc_separation'])
10-
->finder($finder)
8+
return PhpCsFixer\Config::create()
9+
->setRules([
10+
'@Symfony' => true,
11+
'binary_operator_spaces' => ['align_double_arrow' => true],
12+
'array_syntax' => ['syntax' => 'short'],
13+
'concat_space' => ['spacing' => 'one'],
14+
'ordered_imports' => true,
15+
'no_unused_imports' => true,
16+
'phpdoc_summary' => false,
17+
'phpdoc_separation' => false,
18+
])
19+
->setFinder($finder)
1120
;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"ext-phar": "*",
3838
"phpunit/phpunit": "4.*|5.*",
3939
"mockery/mockery": "~0.9.3",
40-
"friendsofphp/php-cs-fixer": "~1.5"
40+
"friendsofphp/php-cs-fixer": "^2.0"
4141
},
4242
"autoload": {
4343
"psr-4": {

0 commit comments

Comments
 (0)