|
| 1 | +<?php |
| 2 | + |
| 3 | +return (new PhpCsFixer\Config()) |
| 4 | + ->setFinder( |
| 5 | + \Symfony\Component\Finder\Finder::create() |
| 6 | + ->in([ |
| 7 | + __DIR__ . '/src', |
| 8 | + __DIR__ . '/test', |
| 9 | + ]) |
| 10 | + ) |
| 11 | + ->setRiskyAllowed(true) |
| 12 | + ->setRules([ |
| 13 | + '@Symfony' => true, |
| 14 | + 'align_multiline_comment' => true, |
| 15 | + 'array_indentation' => true, |
| 16 | + 'array_syntax' => ['syntax' => 'short'], |
| 17 | + 'backtick_to_shell_exec' => true, |
| 18 | + 'blank_line_before_statement' => ['statements' => ['return']], |
| 19 | + 'class_keyword_remove' => false, |
| 20 | + 'combine_consecutive_issets' => true, |
| 21 | + 'combine_consecutive_unsets' => true, |
| 22 | + 'comment_to_phpdoc' => true, |
| 23 | + 'compact_nullable_typehint' => true, |
| 24 | + 'date_time_immutable' => true, |
| 25 | + 'declare_strict_types' => true, |
| 26 | + 'doctrine_annotation_array_assignment' => true, |
| 27 | + 'doctrine_annotation_braces' => true, |
| 28 | + 'doctrine_annotation_indentation' => true, |
| 29 | + 'doctrine_annotation_spaces' => true, |
| 30 | + 'escape_implicit_backslashes' => true, |
| 31 | + 'explicit_indirect_variable' => true, |
| 32 | + 'explicit_string_variable' => true, |
| 33 | + 'final_internal_class' => true, |
| 34 | + 'fully_qualified_strict_types' => true, |
| 35 | + 'general_phpdoc_annotation_remove' => false, |
| 36 | + 'header_comment' => false, |
| 37 | + 'heredoc_to_nowdoc' => false, |
| 38 | + 'linebreak_after_opening_tag' => true, |
| 39 | + 'list_syntax' => ['syntax' => 'short'], |
| 40 | + 'mb_str_functions' => true, |
| 41 | + 'method_chaining_indentation' => true, |
| 42 | + 'multiline_comment_opening_closing' => true, |
| 43 | + 'multiline_whitespace_before_semicolons' => true, |
| 44 | + 'native_function_invocation' => false, |
| 45 | + 'no_alternative_syntax' => true, |
| 46 | + 'no_blank_lines_before_namespace' => false, |
| 47 | + 'no_null_property_initialization' => true, |
| 48 | + 'no_php4_constructor' => true, |
| 49 | + 'echo_tag_syntax' => ['format'=> 'long'], |
| 50 | + 'no_superfluous_elseif' => true, |
| 51 | + 'no_unreachable_default_argument_value' => true, |
| 52 | + 'no_useless_else' => true, |
| 53 | + 'no_useless_return' => true, |
| 54 | + 'not_operator_with_space' => false, |
| 55 | + 'not_operator_with_successor_space' => false, |
| 56 | + 'ordered_class_elements' => false, |
| 57 | + 'ordered_imports' => true, |
| 58 | + 'php_unit_dedicate_assert' => false, |
| 59 | + 'php_unit_expectation' => false, |
| 60 | + 'php_unit_mock' => false, |
| 61 | + 'php_unit_namespaced' => false, |
| 62 | + 'php_unit_no_expectation_annotation' => false, |
| 63 | + 'phpdoc_order_by_value' => ['annotations' => ['covers']], |
| 64 | + 'php_unit_set_up_tear_down_visibility' => true, |
| 65 | + 'php_unit_strict' => false, |
| 66 | + 'php_unit_test_annotation' => false, |
| 67 | + 'php_unit_test_class_requires_covers' => false, |
| 68 | + 'php_unit_method_casing' => ['case' => 'snake_case'], |
| 69 | + 'phpdoc_add_missing_param_annotation' => true, |
| 70 | + 'phpdoc_order' => true, |
| 71 | + 'phpdoc_types_order' => ['null_adjustment' => 'always_last'], |
| 72 | + 'pow_to_exponentiation' => true, |
| 73 | + 'psr_autoloading' => ['dir' => 'src'], |
| 74 | + 'random_api_migration' => false, |
| 75 | + 'simplified_null_return' => true, |
| 76 | + 'static_lambda' => false, |
| 77 | + 'strict_comparison' => true, |
| 78 | + 'strict_param' => true, |
| 79 | + 'string_line_ending' => true, |
| 80 | + 'ternary_to_null_coalescing' => true, |
| 81 | + 'void_return' => true, |
| 82 | + 'yoda_style' => true, |
| 83 | + 'single_line_throw' => false, |
| 84 | + 'phpdoc_align' => ['align' => 'left'], |
| 85 | + 'phpdoc_to_comment' => false, |
| 86 | + 'global_namespace_import' => [ |
| 87 | + 'import_classes' => true, |
| 88 | + 'import_constants' => true, |
| 89 | + 'import_functions' => true, |
| 90 | + ], |
| 91 | + ]) |
| 92 | +; |
0 commit comments