-
Notifications
You must be signed in to change notification settings - Fork 14
/
.php_cs.dist
57 lines (56 loc) · 2.48 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
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
// one should use PHPUnit methods to set up expected exception instead of annotations
'general_phpdoc_annotation_remove' => ['expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp'],
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'long'],
'method_argument_space' => ['keep_multiple_spaces_after_comma' => false, 'on_multiline' => 'ensure_fully_multiline'],
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'no_extra_consecutive_blank_lines' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'],
'no_short_echo_tag' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_dedicate_assert' => true,
'php_unit_expectation' => true,
// Don't mark tests as @internal
'php_unit_internal_class' => false,
'php_unit_mock' => true,
'php_unit_namespaced' => ['target' => '6.0'],
'php_unit_no_expectation_annotation' => true,
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => true,
// Don't require dots in phpdocs
'phpdoc_annotation_without_dot' => false,
'phpdoc_order' => true,
'phpdoc_summary' => false,
'phpdoc_to_return_type' => true,
'semicolon_after_instruction' => true,
'static_lambda' => true,
'strict_comparison' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
'void_return' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('tests/fixtures')
->in('src')
->in('tests')
)
;