-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
54 lines (52 loc) · 2.06 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
<?php
$finder = PhpCsFixer\Finder::create();
$finder->in(__DIR__ . '/src');
$finder->in(__DIR__ . '/tests');
$finder->in(__DIR__ . '/database');
$finder->in(__DIR__ . '/config');
$finder->in(__DIR__ . '/routes');
return PhpCsFixer\Config::create()
->setRules([
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => true,
'@PSR2' => true,
'cast_spaces' => ['space' => 'single'],
'class_attributes_separation' => ['elements' => ['const', 'method', 'property']],
'constant_case' => ['case' => 'lower'],
'concat_space' => ['spacing' => 'one'],
'fully_qualified_strict_types' => true,
'lowercase_static_reference' => true,
'magic_method_casing' => true,
'magic_constant_casing' => true,
'method_argument_space' => ['keep_multiple_spaces_after_comma' => false, 'on_multiline' => 'ensure_fully_multiline'],
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'native_function_type_declaration_casing' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'php_unit_method_casing' => ['case' => 'snake_case'],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_indent' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_summary' => true,
'return_type_declaration' => ['space_before' => 'none'],
'single_import_per_statement' => true,
'single_line_comment_style' => ['comment_types' => ['asterisk', 'hash']],
'single_quote' => true,
'ternary_to_null_coalescing' => true
])
->setFinder($finder);