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

Commit

Permalink
upgrade php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
garak committed Jan 10, 2017
1 parent e60258e commit eacf227
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 160 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.bowerrc
.php_cs.cache
bin
!bin/bowerphp
!bin/compile
Expand Down
17 changes: 13 additions & 4 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?php
// see https://github.com/FriendsOfPHP/PHP-CS-Fixer

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

return Symfony\CS\Config\Config::create()
->fixers(['concat_with_spaces', 'align_double_arrow', 'short_array_syntax', '-concat_without_spaces', 'ordered_use', 'unused_use', '-phpdoc_short_description', '-phpdoc_separation'])
->finder($finder)
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'binary_operator_spaces' => ['align_double_arrow' => true],
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'ordered_imports' => true,
'no_unused_imports' => true,
'phpdoc_summary' => false,
'phpdoc_separation' => false,
])
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"ext-phar": "*",
"phpunit/phpunit": "4.*|5.*",
"mockery/mockery": "~0.9.3",
"friendsofphp/php-cs-fixer": "~1.5"
"friendsofphp/php-cs-fixer": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit eacf227

Please sign in to comment.