-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
38 lines (35 loc) · 1.21 KB
/
.php-cs-fixer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
$projectDir = __DIR__;
$finder = PhpCsFixer\Finder::create()->in(["$projectDir/src"]);
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
],
'blank_line_after_namespace' => true,
'blank_line_before_statement' => true,
'concat_space' => ['spacing' => 'one'],
'doctrine_annotation_braces' => false,
'linebreak_after_opening_tag' => true,
'phpdoc_add_missing_param_annotation' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'phpdoc_types_order' => true,
'declare_strict_types' => true,
'no_superfluous_phpdoc_tags' => false,
'yoda_style' => ['equal' => false, 'identical'=>false, 'less_and_greater' => false],
'no_unused_imports' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => ['array_destructuring', 'arrays', 'match']
]
])
->setUsingCache(false)
->setFinder($finder)
;
return $config;