/
.php-cs-fixer.dist.php
47 lines (43 loc) · 1.29 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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
//->exclude(['tests/Support'])
->depth(0);
$config = new PhpCsFixer\Config();
$rules = [
'@PHP80Migration' => true,
'declare_strict_types' => true,
'@PhpCsFixer' => true,
'php_unit_test_class_requires_covers' => false,
'php_unit_internal_class' => false,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'no_superfluous_phpdoc_tags' => false,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_to_comment' => false, // Needed to support @Desc annotation
'single_line_throw' => false,
'php_unit_method_casing' => ['case' => 'snake_case'],
'return_assignment' => false,
'blank_line_before_statement' => [
'statements' => [
'break',
'continue',
'declare',
'return',
'throw',
'try',
'if',
],
],
'ordered_class_elements' => false,
'multiline_whitespace_before_semicolons' => true,
'phpdoc_annotation_without_dot' => true,
'no_unused_imports' => true,
];
return $config->setRules($rules)
->setRiskyAllowed(true)
->setLineEnding("\n")
->setFinder($finder);