-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
45 lines (44 loc) · 1.95 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
<?php
return PhpCsFixer\Config::create()
->setRules([
// Use Symfony Rules.
'@Symfony' => true,
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
'declare_equal_normalize' => ['space' => 'single'],
'phpdoc_no_empty_return' => false,
'phpdoc_annotation_without_dot' => false,
// Use Symfony:risky Rules.
'@Symfony:risky' => true,
'is_null' => false,
'php_unit_construct' => false,
'php_unit_dedicate_assert' => false,
'silenced_deprecation_error' => false,
// Use Other Rules.
'protected_to_private' => false,
'ternary_to_null_coalescing' => true,
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'linebreak_after_opening_tag' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'ordered_imports' => [
'importsOrder' => ['const', 'class', 'function'],
'sortAlgorithm' => 'length',
],
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
'phpdoc_order' => true,
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->append([
__FILE__,
])
);