-
Notifications
You must be signed in to change notification settings - Fork 1
/
Php80.php
113 lines (106 loc) · 4.81 KB
/
Php80.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
107
108
109
110
111
112
113
<?php
declare(strict_types=1);
namespace VisualCraft\PhpCsFixerConfig\RuleSet;
use VisualCraft\PhpCsFixerConfig\RuleSetInterface;
final class Php80 implements RuleSetInterface
{
public function name(): string
{
return 'Visual Craft (PHP 8.0)';
}
public function rules(): array
{
return [
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@DoctrineAnnotation' => true,
'doctrine_annotation_braces' => false,
'@PHPUnit84Migration:risky' => true,
'php_unit_test_class_requires_covers' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
'array_syntax' => [
'syntax' => 'short',
],
'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']],
'concat_space' => ['spacing' => 'one'],
'phpdoc_align' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
],
'increment_style' => false,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'fopen_flags' => false,
'return_assignment' => false,
'final_internal_class' => false,
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
],
],
\PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\MultilineCommentOpeningClosingAloneFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoDuplicatedImportsFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoLeadingSlashInGlobalNamespaceFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoNullableBooleanTypeFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoSuperfluousConcatenationFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessDirnameCallFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessParenthesisFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\NoUselessStrlenFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpUnitAssertArgumentsOrderFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpUnitDedicatedAssertFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpUnitNoUselessReturnFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocNoSuperfluousParamFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\SingleSpaceAfterStatementFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\SingleSpaceBeforeStatementFixer::name() => true,
\PhpCsFixerCustomFixers\Fixer\StringableInterfaceFixer::name() => true,
'PedroTroller/ordered_with_getter_and_setter_first' => true,
'PedroTroller/line_break_between_method_arguments' => [
'max-args' => false,
'max-length' => 120,
'automatic-argument-merge' => true,
],
'PedroTroller/line_break_between_statements' => true,
];
}
public function getCustomFixers(): iterable
{
yield from new \PhpCsFixerCustomFixers\Fixers();
yield from new \PedroTroller\CS\Fixer\Fixers();
}
public function getRiskyAllowed(): bool
{
return true;
}
}