-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
48 lines (45 loc) · 1.54 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
39
40
41
42
43
44
45
46
47
48
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/translations')
;
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'no_unneeded_final_method' => false,
'dir_constant' => true,
'modernize_types_casting' => true,
'echo_tag_syntax' => ['format' => 'short'],
'no_useless_else' => true,
'no_useless_return' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_construct' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space',
],
],
'concat_space' => ['spacing' => 'one'],
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
'yoda_style' => [
'always_move_variable' => true,
'equal' => true,
'identical' => true,
'less_and_greater' => true,
],
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'declare_strict_types' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__.'/.php_cs.cache')
;