-
Notifications
You must be signed in to change notification settings - Fork 538
/
.php-cs-fixer.php
72 lines (67 loc) · 2.16 KB
/
.php-cs-fixer.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
62
63
64
65
66
67
68
69
70
71
72
<?php
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$config = new PhpCsFixer\Config();
$finder = $config->getFinder()
->ignoreDotFiles(false)
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$config
->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php-cs-fixer.cache')
->setRiskyAllowed(true)
->setRules([
'array_indentation' => true,
'array_syntax' => true,
'binary_operator_spaces' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'class_attributes_separation' => true,
'class_definition' => true,
'concat_space' => [
'spacing' => 'one',
],
'constant_case' => true,
'elseif' => true,
'function_declaration' => true,
'include' => true,
'increment_style' => [
'style' => 'post',
],
'indentation_type' => true,
'is_null' => true,
'line_ending' => true,
'new_with_parentheses' => true,
'no_extra_blank_lines' => true,
'no_mixed_echo_print' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_superfluous_elseif' => true,
'no_trailing_whitespace' => true,
'ordered_class_elements' => true,
'random_api_migration' => true,
'single_space_around_construct' => [
'constructs_contain_a_single_space' => [
'yield_from',
],
'constructs_preceded_by_a_single_space' => [],
'constructs_followed_by_a_single_space' => [],
],
'strict_param' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => [
'elements' => [
'arguments',
'arrays',
'match',
'parameters',
],
],
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => true,
'void_return' => true,
'whitespace_after_comma_in_array' => true,
]);
return $config;