-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
115 lines (111 loc) · 3.47 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->name('*.php')
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$config = new PhpCsFixer\Config();
return $config->setFinder($finder)
->setUsingCache(false)
->setRiskyAllowed(true)
->setRules([
'@PER' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'@Symfony' => true,
'@PHP80Migration' => true,
'blank_line_between_import_groups' => false,
'concat_space' => [
'spacing' => 'one',
],
'declare_strict_types' => false,
'escape_implicit_backslashes' => false,
'general_phpdoc_annotation_remove' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'increment_style' => ['style' => 'post'],
'is_null' => true,
'list_syntax' => true,
'logical_operators' => true,
'modernize_strpos' => true,
'modernize_types_casting' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_constant_invocation' => true,
'native_function_invocation' => [
'include' => ['@all'],
],
'no_superfluous_phpdoc_tags' => false,
'no_unused_imports' => true,
'no_useless_sprintf' => true,
'nullable_type_declaration_for_default_null_value' => false,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_private',
'constant_protected',
'constant_public',
'property_private',
'property_protected',
'property_public',
'construct',
'destruct',
'magic',
],
'sort_algorithm' => 'none',
],
'ordered_imports' => [
'imports_order' => ['class', 'function', 'const'],
'sort_algorithm' => 'alpha',
],
'ordered_traits' => true,
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_line_span' => [
'property' => 'multi',
'method' => 'multi',
],
'phpdoc_order' => [
'order' => [
'param',
'throws',
'return',
],
],
'phpdoc_order_by_value' => [
'annotations' => [
'throws',
],
],
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_internal_class' => false,
'php_unit_mock_short_will_return' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_test_class_requires_covers' => false,
'self_accessor' => true,
'single_line_empty_body' => false,
'single_line_throw' => false,
'string_length_to_empty' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => [
'arguments',
'arrays',
'match',
'parameters',
],
],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
]);