-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.php-cs-fixer.dist.php
102 lines (99 loc) · 4.09 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
<?php
$finder = PhpCsFixer\Finder::create()
->in('bin')
->in('src')
->in('tests')
->notName('CodeNode.php')
->notName('Logger.php')
;
$config = new PhpCsFixer\Config();
$config
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
->setRiskyAllowed(true)
->setFinder($finder)
->setRules([
'@Symfony' => true,
'@PhpCsFixer' => true,
'@PHP80Migration:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => false,
'cast_spaces' => [
'space' => 'none'
],
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none',
],
],
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'echo_tag_syntax' => ['format' => 'long'],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'header_comment' => [
'header' => "@copyright 2018 Vladimir Jimenez\n@license https://github.com/stakx-io/stakx/blob/master/LICENSE.md MIT",
'comment_type' => 'PHPDoc',
'location' => 'after_open',
'separate' => 'both',
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => [
'imports_order' => [
'const',
'class',
'function',
],
'sort_algorithm' => 'alpha',
],
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => true,
],
'phpdoc_no_empty_return' => false,
'phpdoc_order' => true,
'phpdoc_to_comment' => [
'ignored_tags' => ['var'],
],
'phpdoc_var_without_name' => false,
'phpdoc_to_property_type' => true,
'phpdoc_to_return_type' => true,
'php_unit_fqcn_annotation' => false,
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
],
PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DataProviderNameFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DataProviderReturnTypeFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DataProviderStaticFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\MultilineCommentOpeningClosingAloneFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoDuplicatedImportsFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoPhpStormGeneratedCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoUselessParenthesisFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpUnitAssertArgumentsOrderFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpUnitDedicatedAssertFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpUnitNoUselessReturnFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocNoIncorrectVarAnnotationFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocParamTypeFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocSelfAccessorFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocSingleLineVarFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\StringableInterfaceFixer::name() => true,
])
;
return $config;