Skip to content

Commit b647ff2

Browse files
committed
Bumped php-cs-fixer to latest version
1 parent 8772ab6 commit b647ff2

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/
22
vendor/
3+
.php_cs.cache
34
composer.lock

.php_cs

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
<?php
22

3-
$finder = (new Symfony\Component\Finder\Finder())
4-
->files()
5-
->name('*.php')
6-
->in(__DIR__ . '/src')
7-
->in(__DIR__ . '/spec');
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude(['vendor', 'build'])
5+
->in(__DIR__);
86

9-
return Symfony\CS\Config::create()
10-
->fixers([
11-
'align_double_arrow',
12-
'align_equals',
13-
'concat_with_spaces',
14-
'header_comment',
15-
'logical_not_operators_with_successor_space',
16-
'multiline_spaces_before_semicolon',
17-
'ordered_use',
18-
'phpdoc_order',
19-
'strict',
20-
'strict_param',
7+
return PhpCsFixer\Config::create()
8+
->setRiskyAllowed(true)
9+
->setRules([
10+
'@Symfony' => true,
11+
'binary_operator_spaces' => [
12+
'align_double_arrow' => true,
13+
'align_equals' => true,
14+
],
15+
'concat_space' => ['spacing' => 'one'],
16+
'not_operator_with_successor_space' => true,
17+
'no_multiline_whitespace_before_semicolons' => true,
18+
'no_useless_else' => true,
19+
'no_useless_return' => true,
20+
'ordered_class_elements' => true,
21+
'ordered_imports' => true,
22+
'phpdoc_order' => true,
23+
'strict_comparison' => true,
24+
'strict_param' => true,
2125
])
22-
->finder($finder);
26+
->setFinder($finder);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"require-dev": {
2828
"phpspec/phpspec": "^2.0",
2929
"henrikbjorn/phpspec-code-coverage": "^2.0",
30-
"friendsofphp/php-cs-fixer": "^1.12",
30+
"friendsofphp/php-cs-fixer": "^2.0",
3131
"satooshi/php-coveralls": "^1.0"
3232
},
3333
"extra": {

0 commit comments

Comments
 (0)