-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
89 lines (77 loc) · 1.98 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
<?php
use PhpCsFixer\{
Config,
Finder
};
$fileHeaderComment = <<<'TXT'
(c) David Schwarz <[email protected]>
https://davidschwarz.eu
License: MIT License
TXT;
return (new Config())
->setRules([
'@PSR12' => true,
// Alias
'no_alias_language_construct_call' => true,
'no_mixed_echo_print' => true,
// ...
// Comment
'header_comment' => [
'header' => $fileHeaderComment
],
'multiline_comment_opening_closing' => true,
'no_empty_comment' => true,
'single_line_comment_spacing' => true,
'single_line_comment_style' => [
'comment_types' => ['hash']
],
// ...
// Import
'fully_qualified_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true
],
'no_unneeded_import_alias' => true,
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const'
],
'sort_algorithm' => 'alpha'
],
'single_import_per_statement' => true,
// ...
// Whitespace
// ...
'no_extra_blank_lines' => [
'tokens' => [
'attribute',
'break',
'case',
'continue',
'curly_brace_block',
'default',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'switch',
'throw',
'use',
'use_trait'
]
],
// ...
// ...
])
->setFinder(
Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
)
->setCacheFile(__DIR__.'/.php-cs-fixer.cache')
;