From 1ea5cf90c6e3f83aa1a8c0bec2a45692d5d39f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 26 Dec 2020 15:38:56 +0100 Subject: [PATCH] Fix: Configure braces fixer using all non-deprecated options --- src/RuleSet/Php71.php | 4 ++++ src/RuleSet/Php73.php | 4 ++++ src/RuleSet/Php74.php | 4 ++++ test/Unit/RuleSet/Php71Test.php | 4 ++++ test/Unit/RuleSet/Php73Test.php | 4 ++++ test/Unit/RuleSet/Php74Test.php | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/src/RuleSet/Php71.php b/src/RuleSet/Php71.php index e1736b1e..5697681d 100644 --- a/src/RuleSet/Php71.php +++ b/src/RuleSet/Php71.php @@ -59,6 +59,10 @@ final class Php71 extends AbstractRuleSet implements ExplicitRuleSet ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single', diff --git a/src/RuleSet/Php73.php b/src/RuleSet/Php73.php index dced7e2f..277002b1 100644 --- a/src/RuleSet/Php73.php +++ b/src/RuleSet/Php73.php @@ -59,6 +59,10 @@ final class Php73 extends AbstractRuleSet implements ExplicitRuleSet ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single', diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index 681c5e28..3cca968b 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -59,6 +59,10 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single', diff --git a/test/Unit/RuleSet/Php71Test.php b/test/Unit/RuleSet/Php71Test.php index 520c9eb5..fde55aad 100644 --- a/test/Unit/RuleSet/Php71Test.php +++ b/test/Unit/RuleSet/Php71Test.php @@ -65,6 +65,10 @@ final class Php71Test extends ExplicitRuleSetTestCase ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single', diff --git a/test/Unit/RuleSet/Php73Test.php b/test/Unit/RuleSet/Php73Test.php index 46b4fbbd..6ef9f535 100644 --- a/test/Unit/RuleSet/Php73Test.php +++ b/test/Unit/RuleSet/Php73Test.php @@ -65,6 +65,10 @@ final class Php73Test extends ExplicitRuleSetTestCase ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single', diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 9c7d951d..541cbfc4 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -65,6 +65,10 @@ final class Php74Test extends ExplicitRuleSetTestCase ], 'braces' => [ 'allow_single_line_anonymous_class_with_empty_body' => true, + 'allow_single_line_closure' => false, + 'position_after_anonymous_constructs' => 'same', + 'position_after_control_structures' => 'same', + 'position_after_functions_and_oop_constructs' => 'next', ], 'cast_spaces' => [ 'space' => 'single',