From 9f05a24c47b3b622331becac43c32bfea517f0d6 Mon Sep 17 00:00:00 2001 From: Anvit Srivastav Date: Wed, 9 Oct 2024 17:46:21 -0700 Subject: [PATCH] Update PHP CS Fixer rules Add exceptions for some of the new rules in PHP CS Fixer 3.64.0 --- .php-cs-fixer.dist.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index cca061142e..7311622c46 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -5,6 +5,7 @@ $finder = PhpCsFixer\Finder::create() ->exclude('.coverage') ->exclude('cache') + ->notPath('docker/') ->notPath('#/model/om/#') ->notPath('#/model/map/#') ->in(__DIR__) @@ -20,9 +21,27 @@ // which includes ensure_fully_multiline, causes // inconsistencies in templates. return (new PhpCsFixer\Config()) + ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) ->setRules([ '@PhpCsFixer' => true, 'method_argument_space' => ['on_multiline' => 'ignore'], + 'fully_qualified_strict_types' => false, + 'statement_indentation' => false, + 'single_line_empty_body' => false, + 'string_implicit_backslashes' => false, + 'no_extra_blank_lines' => ['tokens' => ['extra']], + 'single_line_comment_spacing' => false, + 'no_multiple_statements_per_line' => false, + 'no_unneeded_control_parentheses' => ['statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield']], + 'multiline_whitespace_before_semicolons' => false, + 'single_space_around_construct' => false, + 'phpdoc_separation' => false, + 'phpdoc_align' => false, + 'phpdoc_trim' => false, + 'no_superfluous_phpdoc_tags' => false, + 'nullable_type_declaration_for_default_null_value' => false, + 'no_useless_concat_operator' => false, + 'blank_line_before_statement' => false, ]) ->setFinder($finder) ;