|
| 1 | +<?php |
| 2 | + |
| 3 | +$config = \PhpCsFixer\Config::create() |
| 4 | + ->setRiskyAllowed(true) |
| 5 | + ->setIndent("\t") |
| 6 | + ->setUsingCache(false) |
| 7 | + ->setRules([ |
| 8 | + '@PHP56Migration' => true, |
| 9 | + '@PHPUnit60Migration:risky' => true, |
| 10 | + '@PhpCsFixer' => true, |
| 11 | + '@PhpCsFixer:risky' => true, |
| 12 | + 'list_syntax' => ['syntax' => 'short'], |
| 13 | + '@PSR2' => true, |
| 14 | + 'align_multiline_comment' => true, |
| 15 | + 'array_syntax' => ['syntax' => 'short'], |
| 16 | + 'blank_line_after_namespace' => true, |
| 17 | + 'blank_line_after_opening_tag' => true, |
| 18 | + 'blank_line_before_statement' => false, |
| 19 | + 'binary_operator_spaces' => true, |
| 20 | + 'cast_spaces' => true, |
| 21 | + 'class_keyword_remove' => false, |
| 22 | + 'combine_consecutive_issets' => true, |
| 23 | + 'combine_consecutive_unsets' => true, |
| 24 | + 'compact_nullable_typehint' => true, |
| 25 | + 'concat_space' => [ |
| 26 | + 'spacing' => 'one', |
| 27 | + ], |
| 28 | + 'explicit_string_variable' => false, |
| 29 | + 'declare_equal_normalize' => true, |
| 30 | + 'dir_constant' => false, |
| 31 | + 'doctrine_annotation_braces' => true, |
| 32 | + 'doctrine_annotation_indentation' => true, |
| 33 | + 'doctrine_annotation_spaces' => true, |
| 34 | + 'function_typehint_space' => true, |
| 35 | + 'general_phpdoc_annotation_remove' => false, |
| 36 | + 'hash_to_slash_comment' => true, |
| 37 | + 'include' => true, |
| 38 | + 'linebreak_after_opening_tag' => true, |
| 39 | + 'lowercase_cast' => true, |
| 40 | + 'magic_constant_casing' => true, |
| 41 | + 'method_chaining_indentation' => true, |
| 42 | + 'method_separation' => true, |
| 43 | + 'method_argument_space' => true, |
| 44 | + 'modernize_types_casting' => true, |
| 45 | + 'multiline_comment_opening_closing' => true, |
| 46 | + 'no_multiline_whitespace_before_semicolons' => true, |
| 47 | + 'native_function_casing' => true, |
| 48 | + 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], |
| 49 | + 'new_with_braces' => true, |
| 50 | + 'no_alias_functions' => true, |
| 51 | + 'no_blank_lines_after_class_opening' => true, |
| 52 | + 'no_blank_lines_after_phpdoc' => true, |
| 53 | + 'no_blank_lines_before_namespace' => false, |
| 54 | + 'no_closing_tag' => true, |
| 55 | + 'no_empty_comment' => true, |
| 56 | + 'no_empty_phpdoc' => true, |
| 57 | + 'no_empty_statement' => true, |
| 58 | + 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], |
| 59 | + 'no_extra_consecutive_blank_lines' => [ |
| 60 | + 'break', |
| 61 | + 'continue', |
| 62 | + 'curly_brace_block', |
| 63 | + 'extra', |
| 64 | + 'parenthesis_brace_block', |
| 65 | + 'return', |
| 66 | + 'square_brace_block', |
| 67 | + 'throw', |
| 68 | + 'use', |
| 69 | + 'useTrait', |
| 70 | + ], |
| 71 | + 'no_leading_import_slash' => true, |
| 72 | + 'no_leading_namespace_whitespace' => true, |
| 73 | + 'no_mixed_echo_print' => [ |
| 74 | + 'use' => 'echo', |
| 75 | + ], |
| 76 | + 'no_multiline_whitespace_around_double_arrow' => true, |
| 77 | + 'no_multiline_whitespace_before_semicolons' => true, |
| 78 | + 'no_null_property_initialization' => true, |
| 79 | + 'no_php4_constructor' => false, |
| 80 | + 'no_short_bool_cast' => true, |
| 81 | + 'no_short_echo_tag' => true, |
| 82 | + 'no_superfluous_phpdoc_tags' => false, |
| 83 | + 'no_singleline_whitespace_before_semicolons' => true, |
| 84 | + 'no_spaces_after_function_name' => true, |
| 85 | + 'no_spaces_around_offset' => true, |
| 86 | + 'no_spaces_inside_parenthesis' => true, |
| 87 | + 'no_trailing_comma_in_list_call' => true, |
| 88 | + 'no_trailing_comma_in_singleline_array' => true, |
| 89 | + 'no_trailing_whitespace' => true, |
| 90 | + 'no_trailing_whitespace_in_comment' => true, |
| 91 | + 'no_unneeded_control_parentheses' => true, |
| 92 | + 'no_unneeded_final_method' => true, |
| 93 | + 'no_unused_imports' => true, |
| 94 | + 'no_useless_return' => true, |
| 95 | + 'no_whitespace_before_comma_in_array' => true, |
| 96 | + 'no_whitespace_in_blank_line' => true, |
| 97 | + 'normalize_index_brace' => true, |
| 98 | + 'not_operator_with_space' => false, |
| 99 | + 'not_operator_with_successor_space' => false, |
| 100 | + 'object_operator_without_whitespace' => true, |
| 101 | + 'ordered_class_elements' => false, |
| 102 | + 'ordered_imports' => true, |
| 103 | + 'php_unit_construct' => [], |
| 104 | + 'php_unit_fqcn_annotation' => true, |
| 105 | + 'php_unit_strict' => true, |
| 106 | + 'phpdoc_add_missing_param_annotation' => [ |
| 107 | + 'only_untyped' => false, |
| 108 | + ], |
| 109 | + 'phpdoc_align' => true, |
| 110 | + 'phpdoc_annotation_without_dot' => false, |
| 111 | + 'phpdoc_indent' => true, |
| 112 | + 'phpdoc_inline_tag' => true, |
| 113 | + 'phpdoc_no_access' => true, |
| 114 | + 'phpdoc_no_empty_return' => false, |
| 115 | + 'phpdoc_no_package' => false, |
| 116 | + 'phpdoc_no_useless_inheritdoc' => true, |
| 117 | + 'phpdoc_order' => true, |
| 118 | + 'phpdoc_return_self_reference' => true, |
| 119 | + 'phpdoc_scalar' => true, |
| 120 | + 'phpdoc_separation' => true, |
| 121 | + 'phpdoc_single_line_var_spacing' => true, |
| 122 | + 'phpdoc_summary' => true, |
| 123 | + 'phpdoc_trim' => true, |
| 124 | + 'phpdoc_types' => true, |
| 125 | + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], |
| 126 | + 'phpdoc_var_without_name' => true, |
| 127 | + 'psr_autoloading' => false, |
| 128 | + 'return_type_declaration' => true, |
| 129 | + 'self_accessor' => true, |
| 130 | + 'semicolon_after_instruction' => true, |
| 131 | + 'short_scalar_cast' => true, |
| 132 | + 'silenced_deprecation_error' => false, |
| 133 | + 'single_blank_line_at_eof' => true, |
| 134 | + 'single_blank_line_before_namespace' => true, |
| 135 | + 'single_class_element_per_statement' => true, |
| 136 | + 'single_import_per_statement' => true, |
| 137 | + 'single_line_comment_style' => true, |
| 138 | + 'single_line_throw' => true, |
| 139 | + 'single_quote' => true, |
| 140 | + 'space_after_semicolon' => true, |
| 141 | + 'standardize_not_equals' => true, |
| 142 | + 'strict_comparison' => false, |
| 143 | + 'strict_param' => false, |
| 144 | + 'switch_case_semicolon_to_colon' => true, |
| 145 | + 'switch_case_space' => true, |
| 146 | + 'ternary_operator_spaces' => true, |
| 147 | + 'ternary_to_null_coalescing' => true, |
| 148 | + 'trailing_comma_in_multiline_array' => false, |
| 149 | + 'trim_array_spaces' => true, |
| 150 | + 'unary_operator_spaces' => true, |
| 151 | + 'visibility_required' => [ |
| 152 | + 'property', |
| 153 | + 'method', |
| 154 | + ], |
| 155 | + 'whitespace_after_comma_in_array' => true, |
| 156 | + ]) |
| 157 | + ->setFinder(PhpCsFixer\Finder::create() |
| 158 | + ->exclude('vendor') |
| 159 | + ->in(__DIR__) |
| 160 | +); |
| 161 | + |
| 162 | +return $config; |
0 commit comments