forked from theofidry/AliceBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
86 lines (80 loc) · 2.35 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
<?php
declare(strict_types=1);
$header = <<<'HEADER'
This file is part of the Hautelook\AliceBundle package.
(c) Baldur Rensch <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->in(__DIR__.'/fixtures')
->exclude('fixtures/Resolver/cache/')
->exclude('fixtures/Functional/cache/')
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only',
],
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short',
],
'braces' => [
'allow_single_line_closure' => true,
],
//'declare_strict_types' => true,
'doctrine_annotation_array_assignment' => [
'operator' => '=',
],
'doctrine_annotation_spaces' => [
'after_array_assignments_equals' => false,
'before_array_assignments_equals' => false,
],
'header_comment' => [
'header' => $header,
'location' => 'after_open',
],
'native_function_invocation' => [
'include' => [
'@compiler_optimized',
],
],
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'curly_brace_block',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'throw',
'use',
],
],
'no_superfluous_phpdoc_tags' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
'importsOrder' => [
'class',
'function',
'const',
],
'sortAlgorithm' => 'alpha',
],
'phpdoc_order' => true,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
])
->setFinder($finder)
;