-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
61 lines (57 loc) · 1.95 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
51
52
53
54
55
56
57
58
59
60
61
<?php
declare(strict_types=1);
use PhpCsFixer\Finder;
use PhpCsFixer\Config;
$finder = Finder::create()
->files()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'braces' => [
'allow_single_line_closure' => true,
'allow_single_line_anonymous_class_with_empty_body' => true,
],
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'function_typehint_space' => true,
'list_syntax' => ['syntax' => 'short'],
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_leading_namespace_whitespace' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_whitespace_before_comma_in_array' => true,
'no_unused_imports' => true,
'normalize_index_brace' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'php_unit_method_casing' => ['case' => 'snake_case'],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_line_span' => ['const' => 'single', 'property' => 'single', 'method' => 'multi'],
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_summary' => false,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true,
'single_quote' => true,
'trailing_comma_in_multiline' => [
'elements' => ['arrays'],
],
'trim_array_spaces' => true,
'void_return' => true,
]);