Skip to content

Commit aef3844

Browse files
committed
Fix php-cs-fixer configuration
1 parent dae9991 commit aef3844

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.php_cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ $finder = PhpCsFixer\Finder::create()
77
->exclude('_temp')
88
->in(__DIR__);
99

10+
$rules = [
11+
'@Symfony' => true,
12+
'combine_consecutive_unsets' => true,
13+
'linebreak_after_opening_tag' => true,
14+
'no_multiline_whitespace_before_semicolons' => true,
15+
'no_useless_else' => true,
16+
'no_useless_return' => true,
17+
'ordered_imports' => true,
18+
'phpdoc_order' => true,
19+
'array_syntax' => ['syntax' => 'short'],
20+
];
21+
22+
if (class_exists('PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer')) {
23+
$rules['yoda_style'] = false;
24+
}
25+
1026
return PhpCsFixer\Config::create()
11-
->setRules([
12-
'@Symfony' => true,
13-
'combine_consecutive_unsets' => true,
14-
'linebreak_after_opening_tag' => true,
15-
'no_multiline_whitespace_before_semicolons' => true,
16-
'no_useless_else' => true,
17-
'no_useless_return' => true,
18-
'ordered_imports' => true,
19-
'phpdoc_order' => true,
20-
'array_syntax' => ['syntax' => 'short'],
21-
])
27+
->setRules($rules)
2228
->setFinder($finder);

0 commit comments

Comments
 (0)