2 |
2 |
|
3 |
3 |
return PhpCsFixer\Config::create()
|
4 |
4 |
->setRules(array(
|
5 |
|
'@PSR2' => true,
|
|
5 |
'@Symfony' => true,
|
6 |
6 |
'array_indentation' => true,
|
7 |
7 |
'array_syntax' => array('syntax' => 'short'),
|
8 |
8 |
'combine_consecutive_unsets' => true,
|
... | ... | |
14 |
14 |
'align_double_arrow' => false,
|
15 |
15 |
'align_equals' => false,
|
16 |
16 |
),
|
|
17 |
'blank_line_before_statement' => array('statements' => array(
|
|
18 |
'return',
|
|
19 |
)),
|
17 |
20 |
'braces' => array(
|
18 |
21 |
'allow_single_line_closure' => true,
|
19 |
22 |
'position_after_functions_and_oop_constructs' => 'same'
|
20 |
23 |
),
|
|
24 |
'cast_spaces' => true,
|
21 |
25 |
'class_definition' => array('singleLine' => true),
|
22 |
|
'concat_space' => array('spacing' => 'one'),
|
|
26 |
'concat_space' => array('spacing' => 'none'),
|
23 |
27 |
'hash_to_slash_comment' => true,
|
24 |
28 |
'no_extra_consecutive_blank_lines' => array(
|
25 |
29 |
'curly_brace_block',
|
... | ... | |
33 |
37 |
'use',
|
34 |
38 |
),
|
35 |
39 |
'no_whitespace_before_comma_in_array' => true,
|
|
40 |
'ordered_imports' => array('imports_order' => array(
|
|
41 |
'const',
|
|
42 |
'class',
|
|
43 |
'function'
|
|
44 |
), 'sort_algorithm' => 'length'),
|
|
45 |
'short_scalar_cast' => true,
|
|
46 |
'simplified_null_return' => true,
|
|
47 |
'single_import_per_statement' => true,
|
|
48 |
'single_line_after_imports' => true,
|
|
49 |
'single_line_comment_style' => true,
|
|
50 |
'standardize_increment' => true,
|
|
51 |
'standardize_not_equals' => true,
|
|
52 |
'space_after_semicolon' => array(
|
|
53 |
'remove_in_empty_for_expressions' => true,
|
|
54 |
),
|
|
55 |
'switch_case_semicolon_to_colon' => true,
|
|
56 |
'switch_case_space' => true,
|
|
57 |
'ternary_operator_spaces' => true,
|
|
58 |
'ternary_to_null_coalescing' => true,
|
|
59 |
'trim_array_spaces' => true,
|
|
60 |
'unary_operator_spaces' => true,
|
|
61 |
'visibility_required' => true,
|
|
62 |
'whitespace_after_comma_in_array' => true,
|
|
63 |
'align_multiline_comment' => true,
|
|
64 |
'constant_case' => true,
|
|
65 |
'declare_equal_normalize' => true,
|
|
66 |
'elseif' => true,
|
|
67 |
'function_declaration' => true,
|
|
68 |
'function_typehint_space' => true,
|
|
69 |
'global_namespace_import' => array(
|
|
70 |
'import_classes' => true,
|
|
71 |
'import_constants' => true,
|
|
72 |
'import_functions' => true,
|
|
73 |
),
|
|
74 |
'include' => true,
|
|
75 |
'linebreak_after_opening_tag' => true,
|
|
76 |
'list_syntax' => array('syntax' => 'short'),
|
|
77 |
'lowercase_cast' => true,
|
|
78 |
'lowercase_keywords' => true,
|
|
79 |
'lowercase_static_reference' => true,
|
|
80 |
'magic_constant_casing' => true,
|
|
81 |
'magic_method_casing' => true,
|
|
82 |
'method_argument_space' => array(
|
|
83 |
'on_multiline' => 'ensure_fully_multiline',
|
|
84 |
'keep_multiple_spaces_after_comma' => false,
|
|
85 |
)
|
36 |
86 |
))
|
37 |
87 |
//->setIndent("\t")
|
38 |
88 |
->setLineEnding("\n")
|
linter done