From 1ddef0e23251064a0771a15ab1ea38a313a6cbc3 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 23 Nov 2021 14:27:50 +0100 Subject: [PATCH] cs: Add missing configuration file. --- .php_cs.dist.php | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 .php_cs.dist.php diff --git a/.php_cs.dist.php b/.php_cs.dist.php new file mode 100644 index 000000000..772e26cec --- /dev/null +++ b/.php_cs.dist.php @@ -0,0 +1,78 @@ +getFinder() + ->ignoreDotFiles(false) + ->name(['.php_cs.dist.php']); + +$rules = $config->getRules(); + +$riskyRules = [ + 'final_internal_class' => false, + 'no_useless_sprintf' => false, + 'dir_constant' => false, + 'no_alias_functions' => false, + 'implode_call' => false, + 'combine_nested_dirname' => false, + 'pow_to_exponentiation' => false, + 'comment_to_phpdoc' => false, + 'no_unset_on_property' => false, + 'strict_param' => false, + 'native_constant_invocation' => false, + 'php_unit_test_annotation' => false, + 'php_unit_no_expectation_annotation' => false, + 'declare_strict_types' => false, + 'function_to_constant' => false, + 'is_null' => false, + 'native_function_invocation' => false, + 'ternary_to_elvis_operator' => false, + 'no_trailing_whitespace_in_string' => false, + 'no_unreachable_default_argument_value' => false, + 'php_unit_test_case_static_method_calls' => false, + 'strict_comparison' => false, + 'array_push' => false, + 'ereg_to_preg' => false, + 'error_suppression' => false, + 'fopen_flag_order' => false, + 'fopen_flags' => false, + 'logical_operators' => false, + 'modernize_types_casting' => false, + 'no_homoglyph_names' => false, + 'no_unneeded_final_method' => false, + 'non_printable_character' => false, + 'ordered_traits' => false, + 'php_unit_mock_short_will_return' => false, + 'php_unit_set_up_tear_down_visibility' => false, + 'set_type_to_cast' => false, + 'string_line_ending' => false, + 'ordered_interfaces' => false, + 'php_unit_expectation' => false, + 'php_unit_mock' => false, + 'php_unit_namespaced' => false, + 'random_api_migration' => false, + 'static_lambda' => false, + 'php_unit_construct' => false, + 'psr_autoloading' => false, + 'php_unit_dedicate_assert' => false, +]; + +$rules = array_merge( + $rules, + $riskyRules +); + +$rules['header_comment']['header'] = trim(file_get_contents(__DIR__ . '/resource/header.txt')); + +return $config->setRules($rules);