From 57c0ac89c978119efb99cef2c3f2b12a7d9d89ce Mon Sep 17 00:00:00 2001 From: Kei Date: Wed, 31 Jul 2024 03:23:41 +0700 Subject: [PATCH] relaxplus: Add `multiline_comment_opening_closing` --- src/RuleSet/Sets/RelaxPlus.php | 1 + tests/Fixtures/Ruleset/relaxplus_actual.php | 5 +++++ tests/Fixtures/Ruleset/relaxplus_expected.php | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/RuleSet/Sets/RelaxPlus.php b/src/RuleSet/Sets/RelaxPlus.php index 42e8147..d4e46d7 100644 --- a/src/RuleSet/Sets/RelaxPlus.php +++ b/src/RuleSet/Sets/RelaxPlus.php @@ -27,6 +27,7 @@ public function mainRules(): array return [ 'assign_null_coalescing_to_coalesce_equal' => true, 'explicit_string_variable' => true, + 'multiline_comment_opening_closing' => true, 'no_superfluous_elseif' => true, 'numeric_literal_separator' => ['override_existing' => true], 'php_unit_fqcn_annotation' => true, diff --git a/tests/Fixtures/Ruleset/relaxplus_actual.php b/tests/Fixtures/Ruleset/relaxplus_actual.php index d4df95d..1354611 100644 --- a/tests/Fixtures/Ruleset/relaxplus_actual.php +++ b/tests/Fixtures/Ruleset/relaxplus_actual.php @@ -13,6 +13,11 @@ public function basic__numeric_literal_separator() echo 1234_5678; } + /****** + * Multiline comment with arbitrary asterisks count + ******/ + public function comment__multiline_comment_opening_closing() {} + public function control_structure__no_superfluous_elseif() { if (true) { diff --git a/tests/Fixtures/Ruleset/relaxplus_expected.php b/tests/Fixtures/Ruleset/relaxplus_expected.php index 9d3c821..88460cf 100644 --- a/tests/Fixtures/Ruleset/relaxplus_expected.php +++ b/tests/Fixtures/Ruleset/relaxplus_expected.php @@ -13,6 +13,11 @@ public function basic__numeric_literal_separator() echo 12_345_678; } + /* + * Multiline comment with arbitrary asterisks count + */ + public function comment__multiline_comment_opening_closing() {} + public function control_structure__no_superfluous_elseif() { if (true) {