From 338371ba17dcb233de0437d04ae7dba6500748a0 Mon Sep 17 00:00:00 2001 From: Kei Date: Fri, 2 Aug 2024 03:19:53 +0700 Subject: [PATCH] revert: Add `numeric_literal_separator` https://github.com/realodix/relax/commit/8a4b07c07a311fee41f66ef2a38e8e171bd7a912 --- src/RuleSet/Sets/Relax.php | 1 - src/RuleSet/Sets/RelaxPlus.php | 1 - tests/Fixtures/Ruleset/relax_actual.php | 11 ----------- tests/Fixtures/Ruleset/relax_expected.php | 11 ----------- tests/Fixtures/Ruleset/relaxplus_actual.php | 11 ----------- tests/Fixtures/Ruleset/relaxplus_expected.php | 11 ----------- 6 files changed, 46 deletions(-) diff --git a/src/RuleSet/Sets/Relax.php b/src/RuleSet/Sets/Relax.php index 3e1aed4..8341feb 100644 --- a/src/RuleSet/Sets/Relax.php +++ b/src/RuleSet/Sets/Relax.php @@ -34,7 +34,6 @@ public function mainRules(): array 'no_useless_concat_operator' => true, 'no_useless_else' => true, 'no_useless_nullsafe_operator' => true, - 'numeric_literal_separator' => true, 'operator_linebreak' => ['only_booleans' => true], 'ordered_class_elements' => ['order' => ['use_trait']], 'ordered_types' => ['sort_algorithm' => 'none'], diff --git a/src/RuleSet/Sets/RelaxPlus.php b/src/RuleSet/Sets/RelaxPlus.php index c5780da..89b4b73 100644 --- a/src/RuleSet/Sets/RelaxPlus.php +++ b/src/RuleSet/Sets/RelaxPlus.php @@ -29,7 +29,6 @@ public function mainRules(): array 'assign_null_coalescing_to_coalesce_equal' => true, 'explicit_string_variable' => true, 'multiline_comment_opening_closing' => true, - 'numeric_literal_separator' => ['override_existing' => true], 'php_unit_fqcn_annotation' => true, 'string_implicit_backslashes' => true, 'ternary_to_null_coalescing' => true, diff --git a/tests/Fixtures/Ruleset/relax_actual.php b/tests/Fixtures/Ruleset/relax_actual.php index 911eb54..0a3d87d 100644 --- a/tests/Fixtures/Ruleset/relax_actual.php +++ b/tests/Fixtures/Ruleset/relax_actual.php @@ -92,17 +92,6 @@ public function basic__no_trailing_comma_in_singleline() // use a\{ClassA, ClassB,}; } - public function basic__numeric_literal_separator() - { - $integer = 12345678; - $octal = 0123456; - $binary = 0b0010010011011010; - $hexadecimal = 0x3D458F4F; - - // override_existing - echo 1234_5678; - } - public function casing__class_reference_name_casing() { new StdClass; throw new \exception(); diff --git a/tests/Fixtures/Ruleset/relax_expected.php b/tests/Fixtures/Ruleset/relax_expected.php index ac5ecf4..178f100 100644 --- a/tests/Fixtures/Ruleset/relax_expected.php +++ b/tests/Fixtures/Ruleset/relax_expected.php @@ -90,17 +90,6 @@ public function basic__no_trailing_comma_in_singleline() // use a\{ClassA, ClassB,}; } - public function basic__numeric_literal_separator() - { - $integer = 12_345_678; - $octal = 0123_456; - $binary = 0b00100100_11011010; - $hexadecimal = 0x3D_45_8F_4F; - - // override_existing - echo 1234_5678; - } - public function casing__class_reference_name_casing() { new stdClass; diff --git a/tests/Fixtures/Ruleset/relaxplus_actual.php b/tests/Fixtures/Ruleset/relaxplus_actual.php index 038d94d..345d515 100644 --- a/tests/Fixtures/Ruleset/relaxplus_actual.php +++ b/tests/Fixtures/Ruleset/relaxplus_actual.php @@ -2,17 +2,6 @@ class relaxplus { - public function basic__numeric_literal_separator() - { - $integer = 12345678; - $octal = 0123456; - $binary = 0b0010010011011010; - $hexadecimal = 0x3D458F4F; - - // override_existing - echo 1234_5678; - } - /****** * Multiline comment with arbitrary asterisks count ******/ diff --git a/tests/Fixtures/Ruleset/relaxplus_expected.php b/tests/Fixtures/Ruleset/relaxplus_expected.php index d984ebf..dcd7f8e 100644 --- a/tests/Fixtures/Ruleset/relaxplus_expected.php +++ b/tests/Fixtures/Ruleset/relaxplus_expected.php @@ -2,17 +2,6 @@ class relaxplus { - public function basic__numeric_literal_separator() - { - $integer = 12_345_678; - $octal = 0123_456; - $binary = 0b00100100_11011010; - $hexadecimal = 0x3D_45_8F_4F; - - // override_existing - echo 12_345_678; - } - /* * Multiline comment with arbitrary asterisks count */