Set version number to 6.1.0 dev 1
[GitHub/WoltLab/com.woltlab.wcf.exporter.git] / .php-cs-fixer.dist.php
CommitLineData
a337ae31
TD
1<?php
2$finder = PhpCsFixer\Finder::create()
3 ->exclude('*/vendor/*')
4 ->in(__DIR__.'/files/');
5
6return (new PhpCsFixer\Config())
7 ->setRiskyAllowed(true)
8 ->setRules([
6108d97d 9 '@PER-CS2.0' => true,
aaf459f1 10 'single_line_empty_body' => false,
a337ae31
TD
11
12 'array_push' => true,
13 'backtick_to_shell_exec' => true,
14 'no_alias_language_construct_call' => true,
15 'no_mixed_echo_print' => true,
16 'pow_to_exponentiation' => true,
17 'random_api_migration' => true,
18
19 'array_syntax' => ['syntax' => 'short'],
20 'no_multiline_whitespace_around_double_arrow' => true,
21 'no_trailing_comma_in_singleline_array' => true,
22 'no_whitespace_before_comma_in_array' => true,
23 'normalize_index_brace' => true,
a337ae31
TD
24 'whitespace_after_comma_in_array' => true,
25
26 'non_printable_character' => ['use_escape_sequences_in_strings' => true],
27
a337ae31
TD
28 'magic_constant_casing' => true,
29 'magic_method_casing' => true,
30 'native_function_casing' => true,
31 'native_function_type_declaration_casing' => true,
32
33 'cast_spaces' => ['space' => 'none'],
a337ae31 34 'no_unset_cast' => true,
a337ae31
TD
35
36 'class_attributes_separation' => true,
a337ae31
TD
37 'no_null_property_initialization' => true,
38 'self_accessor' => true,
39 'single_class_element_per_statement' => true,
a337ae31
TD
40
41 'no_empty_comment' => true,
42 'single_line_comment_style' => ['comment_types' => ['hash']],
43
7f610ed5 44 'native_constant_invocation' => ['strict' => false],
a337ae31
TD
45
46 'no_alternative_syntax' => true,
47 'no_trailing_comma_in_list_call' => true,
48 'no_unneeded_control_parentheses' => ['statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield', 'yield_from']],
49 'no_unneeded_curly_braces' => ['namespaces' => true],
50 'switch_continue_to_break' => true,
7f610ed5 51 'trailing_comma_in_multiline' => ['elements' => ['arrays']],
a337ae31
TD
52
53 'function_typehint_space' => true,
54 'lambda_not_used_import' => true,
7f610ed5 55 'native_function_invocation' => ['include' => ['@internal']],
a337ae31
TD
56 'no_unreachable_default_argument_value' => true,
57 'nullable_type_declaration_for_default_null_value' => true,
a337ae31
TD
58 'static_lambda' => true,
59
60 'fully_qualified_strict_types' => true,
a337ae31
TD
61 'no_unused_imports' => true,
62 'ordered_imports' => true,
63
a337ae31
TD
64 'dir_constant' => true,
65 'explicit_indirect_variable' => true,
66 'function_to_constant' => true,
67 'is_null' => true,
68 'no_unset_on_property' => true,
69
70 'list_syntax' => ['syntax' => 'short'],
71
72 'clean_namespace' => true,
73 'no_leading_namespace_whitespace' => true,
a337ae31
TD
74
75 'no_homoglyph_names' => true,
76
77 'binary_operator_spaces' => true,
78 'concat_space' => ['spacing' => 'one'],
79 'increment_style' => ['style' => 'post'],
80 'logical_operators' => true,
81 'object_operator_without_whitespace' => true,
82 'operator_linebreak' => true,
83 'standardize_increment' => true,
84 'standardize_not_equals' => true,
a337ae31
TD
85 'ternary_to_elvis_operator' => true,
86 'ternary_to_null_coalescing' => true,
87 'unary_operator_spaces' => true,
88
89 'no_useless_return' => true,
a337ae31
TD
90
91 'multiline_whitespace_before_semicolons' => true,
92 'no_empty_statement' => true,
93 'no_singleline_whitespace_before_semicolons' => true,
94 'space_after_semicolon' => ['remove_in_empty_for_expressions' => true],
95
96 'escape_implicit_backslashes' => true,
97 'explicit_string_variable' => true,
98 'heredoc_to_nowdoc' => true,
99 'no_binary_string' => true,
100 'simple_to_complex_string_variable' => true,
101
102 'array_indentation' => true,
103 'blank_line_before_statement' => ['statements' => ['return', 'exit']],
a337ae31 104 'method_chaining_indentation' => true,
b9fb5588 105 'no_extra_blank_lines' => ['tokens' => ['case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'switch', 'throw', 'use']],
a337ae31
TD
106 'no_spaces_around_offset' => true,
107 ])
108 ->setFinder($finder);