-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
97 lines (91 loc) · 2.94 KB
/
.php_cs.dist
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
<?php
/*
* This file is part of the `src-run/augustus-exception-library` project.
*
* (c) Rob Frawley 2nd <rmf@src.run>
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$header = <<<HEADER
This file is part of the `src-run/augustus-exception-library` project.
(c) Rob Frawley 2nd <rmf@src.run>
For the full copyright and license information, please view the LICENSE.md
file that was distributed with this source code.
HEADER;
return Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setFinder((new Finder())->in(__DIR__))
->setHideProgress(false)
->setLineEnding("\n")
->setIndent(' ')
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit57Migration:risky' => true,
'align_multiline_comment' => [
'comment_type' => 'phpdocs_like'
],
'array_syntax' => [
'syntax' => 'short'
],
'braces' => [
'allow_single_line_closure' => true,
],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'final_internal_class' => true,
'header_comment' => [
'header' => $header,
'separate' => 'both'
],
'heredoc_to_nowdoc' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => [
'syntax' => 'short',
],
'mb_str_functions' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'native_constant_invocation' => false,
'native_function_invocation' => false,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private'
],
],
'ordered_imports' => true,
'php_unit_strict' => true,
'php_unit_no_expectation_annotation' => true,
'php_unit_test_class_requires_covers' => true,
'phpdoc_order' => true,
'phpdoc_summary' => false,
'psr4' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
]);