-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
79 lines (76 loc) · 3.16 KB
/
.php-cs-fixer.dist.php
File metadata and controls
79 lines (76 loc) · 3.16 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('public')
->exclude('app')
->exclude('var')
->exclude('node_modules')
->exclude('cache')
->in(__DIR__);
$config = new PhpCsFixer\Config();
return $config->setUsingCache(true)
->setCacheFile(sprintf('%s/cache/.php-cs-fixer.cache', __DIR__))
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PHP56Migration:risky' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => false,
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'function_declaration' => ['closure_fn_spacing' => 'none'],
'list_syntax' => ['syntax' => 'short'],
'single_line_empty_body' => false,
'strict_comparison' => false,
'binary_operator_spaces' => [
'operators' => [
'=' => 'single_space',
'=>' => 'single_space',
'+=' => 'single_space',
'-=' => 'single_space',
'*=' => 'single_space',
'%=' => 'single_space',
'.=' => 'single_space',
'^=' => 'single_space',
],
],
'concat_space' => ['spacing' => 'one'],
'yoda_style' => false,
'class_definition' => [
'single_line' => false,
],
'native_function_invocation' => true,
'native_function_casing' => true,
'native_constant_invocation' => true,
'object_operator_without_whitespace' => false,
'operator_linebreak' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'phpdoc_to_comment' => false,
'php_unit_test_case_static_method_calls' => false,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => [
'const',
'class',
'function',
]
],
])
->setFinder($finder);