forked from allejo/postgame
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php_cs.dist
79 lines (75 loc) · 2.86 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
<?php
$finder = PhpCsFixer\Finder::create()
->in('src')
->in('tests')
->notPath('Kernel.php')
;
$license = <<<HEADER
(c) Vladimir "allejo" Jimenez <[email protected]>
For the full copyright and license information, please view the
LICENSE.md file that was distributed with this source code.
HEADER;
return PhpCsFixer\Config::create()
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@PhpCsFixer' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'cast_spaces' => [
'space' => 'none'
],
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'header_comment' => [
'header' => $license,
'comment_type' => 'comment',
'location' => 'after_declare_strict',
'separate' => 'both',
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'no_short_echo_tag' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => [
'sortAlgorithm' => 'alpha',
'importsOrder' => [
'const',
'class',
'function',
],
],
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => true,
],
'phpdoc_no_empty_return' => false,
'phpdoc_order' => true,
'phpdoc_var_without_name' => false,
'php_unit_fqcn_annotation' => false,
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
],
PhpCsFixerCustomFixers\Fixer\DataProviderNameFixer::name() => [
'prefix' => 'dataProvider_test',
'suffix' => '',
],
PhpCsFixerCustomFixers\Fixer\MultilineCommentOpeningClosingAloneFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoCommentedOutCodeFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoDoctrineMigrationsGeneratedCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoImportFromGlobalNamespaceFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoUselessCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoUselessDoctrineRepositoryCommentFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\NoUselessStrlenFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocNoIncorrectVarAnnotationFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocSingleLineVarFixer::name() => true,
PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer::name() => true,
])
->setFinder($finder)
;