From a4e1c937717e90a3de174e663592e1e9f938112e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Fri, 19 Aug 2022 09:54:40 +0200 Subject: [PATCH] Fix: Explicitly configure new_with_braces fixer --- src/RuleSet/Php74.php | 5 ++++- src/RuleSet/Php80.php | 5 ++++- src/RuleSet/Php81.php | 5 ++++- test/Unit/RuleSet/Php74Test.php | 5 ++++- test/Unit/RuleSet/Php80Test.php | 5 ++++- test/Unit/RuleSet/Php81Test.php | 5 ++++- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/RuleSet/Php74.php b/src/RuleSet/Php74.php index b1e45a30..3f75871c 100644 --- a/src/RuleSet/Php74.php +++ b/src/RuleSet/Php74.php @@ -276,7 +276,10 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP', diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index 658b47de..e89107ae 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -276,7 +276,10 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP', diff --git a/src/RuleSet/Php81.php b/src/RuleSet/Php81.php index e71eb73c..649987c7 100644 --- a/src/RuleSet/Php81.php +++ b/src/RuleSet/Php81.php @@ -276,7 +276,10 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP', diff --git a/test/Unit/RuleSet/Php74Test.php b/test/Unit/RuleSet/Php74Test.php index 81d2fa27..8df9eaf7 100644 --- a/test/Unit/RuleSet/Php74Test.php +++ b/test/Unit/RuleSet/Php74Test.php @@ -282,7 +282,10 @@ final class Php74Test extends ExplicitRuleSetTestCase 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP', diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index 5fda8fd5..238ee482 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -282,7 +282,10 @@ final class Php80Test extends ExplicitRuleSetTestCase 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP', diff --git a/test/Unit/RuleSet/Php81Test.php b/test/Unit/RuleSet/Php81Test.php index e0feb417..8c58947e 100644 --- a/test/Unit/RuleSet/Php81Test.php +++ b/test/Unit/RuleSet/Php81Test.php @@ -282,7 +282,10 @@ final class Php81Test extends ExplicitRuleSetTestCase 'strict' => false, ], 'native_function_type_declaration_casing' => true, - 'new_with_braces' => true, + 'new_with_braces' => [ + 'anonymous_class' => true, + 'named_class' => true, + ], 'no_alias_functions' => [ 'sets' => [ '@IMAP',