Non-activated users should not be able to use conversations by default
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / .php-cs-fixer.dist.php
1 <?php
2 $finder = PhpCsFixer\Finder::create()
3 ->exclude('*/vendor/*')
4 ->in(__DIR__.'/files/');
5
6 return (new PhpCsFixer\Config())
7 ->setRiskyAllowed(true)
8 ->setRules([
9 '@PER-CS2.0' => true,
10 'single_line_empty_body' => false,
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,
24 'whitespace_after_comma_in_array' => true,
25
26 'non_printable_character' => ['use_escape_sequences_in_strings' => true],
27
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'],
34 'no_unset_cast' => true,
35
36 'class_attributes_separation' => true,
37 'no_null_property_initialization' => true,
38 'self_accessor' => true,
39 'single_class_element_per_statement' => true,
40
41 'no_empty_comment' => true,
42 'single_line_comment_style' => ['comment_types' => ['hash']],
43
44 'native_constant_invocation' => ['strict' => false],
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,
51 'trailing_comma_in_multiline' => ['elements' => ['arrays']],
52
53 'function_typehint_space' => true,
54 'lambda_not_used_import' => true,
55 'native_function_invocation' => ['include' => ['@internal']],
56 'no_unreachable_default_argument_value' => true,
57 'nullable_type_declaration_for_default_null_value' => true,
58 'static_lambda' => true,
59
60 'fully_qualified_strict_types' => ['leading_backslash_in_global_namespace' => true],
61 'no_unused_imports' => true,
62 'ordered_imports' => true,
63
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,
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,
85 'ternary_to_elvis_operator' => true,
86 'ternary_to_null_coalescing' => true,
87 'unary_operator_spaces' => true,
88
89 'no_useless_return' => true,
90 'return_assignment' => true,
91
92 'multiline_whitespace_before_semicolons' => true,
93 'no_empty_statement' => true,
94 'no_singleline_whitespace_before_semicolons' => true,
95 'space_after_semicolon' => ['remove_in_empty_for_expressions' => true],
96
97 'escape_implicit_backslashes' => true,
98 'explicit_string_variable' => true,
99 'heredoc_to_nowdoc' => true,
100 'no_binary_string' => true,
101 'simple_to_complex_string_variable' => true,
102
103 'array_indentation' => true,
104 'blank_line_before_statement' => ['statements' => ['return', 'exit']],
105 'method_chaining_indentation' => true,
106 'no_extra_blank_lines' => ['tokens' => ['case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'switch', 'throw', 'use']],
107 'no_spaces_around_offset' => true,
108 ])
109 ->setFinder($finder);