-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.dist.php
103 lines (99 loc) · 3.79 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
<?php
declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__,
])
->append([
__FILE__,
])
->exclude([
'vendor',
])
;
return
(new PhpCsFixer\Config())
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
->setRiskyAllowed(true)
->setRules([
'@PHP80Migration:risky' => true,
'@PHP81Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@PSR12' => true,
'@PSR12:risky' => true,
'blank_line_before_statement' => [
'statements' => [
'continue',
'declare',
'default',
'return',
'throw',
'try',
],
],
'blank_line_between_import_groups' => false,
'braces' => [
'allow_single_line_anonymous_class_with_empty_body' => true,
'allow_single_line_closure' => true,
],
'comment_to_phpdoc' => ['ignored_tags' => ['fixme']],
'date_time_immutable' => true,
'final_class' => true,
'final_public_method_for_abstract_class' => true,
'fopen_flags' => ['b_mode' => true],
'global_namespace_import' => [
'import_constants' => false,
'import_functions' => false,
'import_classes' => false,
],
'method_chaining_indentation' => false,
'no_break_comment' => false,
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'no_trailing_whitespace_in_string' => false,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'case',
'constant_public',
'constant_protected',
'constant_private',
'property_public_static',
'property_protected_static',
'property_private_static',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'phpunit',
'method_public_static',
'method_public_abstract_static',
'method_protected_static',
'method_protected_abstract_static',
'method_private_static',
'method_public',
'method_public_abstract',
'method_protected',
'method_protected_abstract',
'method_private',
],
],
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
'php_unit_strict' => false,
'php_unit_test_case_static_method_calls' => false,
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_align' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_assignment' => false,
'single_line_comment_style' => ['comment_types' => ['hash']],
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays', 'arguments', 'parameters']],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
])
;