-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.dist.php
82 lines (79 loc) · 2.56 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
<?php
declare(strict_types=1);
return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
'@PER-CS2.0' => true,
'@PER-CS2.0:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP81Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit100Migration:risky' => true,
'array_indentation' => true,
'declare_strict_types' => true,
'final_class' => true,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => false,
],
'heredoc_to_nowdoc' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
'multiline_comment_opening_closing' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
'no_useless_else' => true,
'no_useless_return' => true,
'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',
'method_protected',
'method_private',
]],
'ordered_imports' => ['imports_order' => [
'class',
'function',
'const',
]],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => true,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'single_line_empty_body' => true,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'string_implicit_backslashes' => ['single_quoted' => 'ignore'],
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => ['arrays', 'parameters', 'match', 'arguments'],
],
'use_arrow_functions' => false,
'void_return' => false,
])
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->append([__FILE__]),
)
;