-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
106 lines (103 loc) · 4.28 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
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
<?php
/** @noinspection PhpUndefinedMethodInspection */
/** @noinspection PhpUndefinedClassInspection */
/** @noinspection PhpUndefinedNamespaceInspection */
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()->in(__DIR__ . '/src');
$config = new PhpCsFixer\Config();
return $config
->setCacheFile(__DIR__ . '/tools/php-cs-fixer/.cs-fix.cache')
->setRiskyAllowed(true)
->setRules(
[
'@PhpCsFixer' => true,
'align_multiline_comment' => false,
'array_indentation' => false,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => false,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => false,
'cast_spaces' => false,
'class_attributes_separation' => false,
'class_definition' => [
'multi_line_extends_each_single_line' => true,
],
'concat_space' => false,
'declare_strict_types' => true,
'explicit_string_variable' => false,
'final_internal_class' => [
'annotation_exclude' => ['@final', '@ignore-final'],
'annotation_include' => [],
'consider_absent_docblock_as_internal_class' => true,
],
'function_typehint_space' => false,
'global_namespace_import' => [
'import_classes' => true,
],
'heredoc_to_nowdoc' => false,
'increment_style' => false,
'linebreak_after_opening_tag' => false,
'method_chaining_indentation' => true,
'multiline_whitespace_before_semicolons' => [],
'new_with_braces' => false,
'no_blank_lines_after_class_opening' => true,
'no_extra_blank_lines' => true,
'no_multiline_whitespace_around_double_arrow' => false,
'no_singleline_whitespace_before_semicolons' => false,
'no_superfluous_phpdoc_tags' => true,
'no_trailing_comma_in_singleline' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => false,
'operator_linebreak' => false,
'ordered_class_elements' => [
'order' => [
'use_trait',
'case',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'method_public_static',
'construct',
'destruct',
'method_public',
'method_protected',
'method_private',
'method_private_static',
'phpunit',
'magic',
],
'sort_algorithm' => 'none',
],
'ordered_imports' => true,
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_align' => false,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => false,
'phpdoc_separation' => false,
'phpdoc_single_line_var_spacing' => false,
'phpdoc_summary' => false,
'phpdoc_tag_type' => false,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => false,
'phpdoc_var_without_name' => false,
'protected_to_private' => true,
'return_assignment' => false,
'single_blank_line_before_namespace' => false,
'single_line_comment_style' => false,
'single_quote' => false,
'single_space_around_construct' => false,
'static_lambda' => true,
'strict_comparison' => true,
'strict_param' => true,
'ternary_operator_spaces' => false,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters', 'match']],
'unary_operator_spaces' => false,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => false,
],
)->setFinder($finder);