-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.php-cs-fixer.php
44 lines (32 loc) · 1.16 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(['src/back'])
;
$config = new PhpCsFixer\Config();
$rules = [
'@PER-CS' => true,
'@PhpCsFixer' => true,
'global_namespace_import' => ['import_classes' => true],
'function_declaration' => [
'closure_fn_spacing' => 'none',
'closure_function_spacing' => 'none',
],
'phpdoc_to_comment' => false,
'single_line_comment_style' => ['comment_types' => ['hash']],
'ordered_types' => ['null_adjustment' => 'always_first', 'sort_algorithm' => 'none'],
'phpdoc_types_order' => ['null_adjustment' => 'always_first', 'sort_algorithm' => 'none'],
'ordered_class_elements' => false,
'explicit_string_variable' => false,
'blank_line_before_statement' => true,
'type_declaration_spaces' => false,
'binary_operator_spaces' => [
'default' => 'at_least_single_space',
'operators' => ['=' => 'align'],
],
'concat_space' => ['spacing' => 'one'],
];
return $config
->setRules($rules)->setFinder($finder)
->setRiskyAllowed(true)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
;