-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
56 lines (54 loc) · 1.71 KB
/
.php-cs-fixer.dist.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
49
50
51
52
53
54
55
56
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('assets')
->exclude('bin')
->exclude('config')
->exclude('docker')
->exclude('files')
->exclude('public')
->exclude('scripts')
->exclude('templates')
->exclude('tools')
->exclude('translations')
->exclude('var')
->exclude('vendor');
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'blank_line_before_statement' => [
'statements' => [
'declare',
'return',
'throw',
'try',
'if',
'for',
'while',
'foreach',
],
],
'cast_spaces' => ['space' => 'none'],
'constant_case' => ['case' => 'lower'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'phpdoc_align' => false,
'single_line_throw' => false,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => false,
'phpdoc_scalar' => false,
'phpdoc_types' => false,
'increment_style' => false,
'ordered_class_elements' => true,
'nullable_type_declaration_for_default_null_value' => false,
'nullable_type_declaration' => ['syntax' => 'union'],
'ordered_types' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
'PedroTroller/line_break_between_method_arguments' => [
'max-args' => false,
'max-length' => 1,
'automatic-argument-merge' => false,
'inline-attributes' => true,
],
])
->setFinder($finder)
->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers())
;