diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..6740743 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,48 @@ +setRiskyAllowed(true) + ->setRules([ + 'magic_constant_casing' => true, + 'psr4' => true, + 'encoding' => true, + 'full_opening_tag' => true, + 'blank_line_after_namespace' => true, + 'braces' => true, + 'class_definition' => true, + 'elseif' => true, + 'function_declaration' => true, + 'indentation_type' => true, + 'line_ending' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + 'method_argument_space' => [ 'keep_multiple_spaces_after_comma' => false ], + 'no_closing_tag' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'single_blank_line_at_eof' => true, + 'single_class_element_per_statement' => ['property'], + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'switch_case_semicolon_to_colon' => true, + 'switch_case_space' => true, + 'visibility_required' => true, + 'no_whitespace_in_blank_line' => true, + 'concat_space' => [ 'spacing' => 'one' ], + 'method_separation' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_empty_comment' => true, + 'no_extra_consecutive_blank_lines' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unused_imports' => true, + 'normalize_index_brace' => true, + 'object_operator_without_whitespace' => true, + 'ordered_imports' => true, + 'phpdoc_types' => true, + 'return_type_declaration'=>['space_before'=>'one'], + 'trailing_comma_in_multiline_array' => true, + 'single_line_after_imports' => true, + ]); diff --git a/ruleset.xml b/ruleset.xml new file mode 100644 index 0000000..0383bbb --- /dev/null +++ b/ruleset.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +