forked from zenstruck/foundry
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
50 lines (47 loc) · 1.8 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
<?php
$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/tests'])
->notName('*.tpl.php')
->exclude('Fixtures/')
;
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'multiline_comment_opening_closing' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => [
'imports_order' => ['const', 'class', 'function'],
],
'ordered_class_elements' => true,
'native_function_invocation' => ['include' => ['@internal']],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'escape_implicit_backslashes' => true,
'mb_str_functions' => true,
'logical_operators' => true,
'php_unit_method_casing' => ['case' => 'snake_case'],
'php_unit_test_annotation' => ['style' => 'annotation'],
'no_unreachable_default_argument_value' => true,
'declare_strict_types' => false,
'void_return' => false,
'single_trait_insert_per_statement' => false,
'simple_to_complex_string_variable' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'allow_unused_params' => true,
'remove_inheritdoc' => true,
],
'phpdoc_to_comment' => false,
'function_declaration' => ['closure_function_spacing' => 'none'],
'nullable_type_declaration_for_default_null_value' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;