From f34bb1d4700f9493158b29023a71037081ee7e7a Mon Sep 17 00:00:00 2001 From: Kei Date: Tue, 6 Aug 2024 06:22:58 +0700 Subject: [PATCH] relax: remove `PhpdocTypesCommaSpacesFixer` --- src/RuleSet/Sets/Relax.php | 1 - tests/Fixtures/Ruleset/realodixspec_actual.php | 13 +++++++++++++ tests/Fixtures/Ruleset/realodixspec_expected.php | 13 +++++++++++++ tests/Fixtures/Ruleset/relax-custom_actual.php | 5 ----- tests/Fixtures/Ruleset/relax-custom_expected.php | 5 ----- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/RuleSet/Sets/Relax.php b/src/RuleSet/Sets/Relax.php index e8b0746..e932593 100644 --- a/src/RuleSet/Sets/Relax.php +++ b/src/RuleSet/Sets/Relax.php @@ -51,7 +51,6 @@ public function mainRules(): array Fixer\PhpdocNoSuperfluousParamFixer::name() => true, Fixer\PhpdocParamTypeFixer::name() => true, Fixer\PhpdocSelfAccessorFixer::name() => true, - Fixer\PhpdocTypesCommaSpacesFixer::name() => true, Fixer\PhpdocTypesTrimFixer::name() => true, /* diff --git a/tests/Fixtures/Ruleset/realodixspec_actual.php b/tests/Fixtures/Ruleset/realodixspec_actual.php index 2d2db27..d6a641e 100644 --- a/tests/Fixtures/Ruleset/realodixspec_actual.php +++ b/tests/Fixtures/Ruleset/realodixspec_actual.php @@ -67,6 +67,19 @@ public function comment() // } + /** + * Get the attributes that should be cast. + * + * @return array{user_id:'integer',is_custom:'boolean'} + */ + protected function casts(): array + { + return [ + 'user_id' => 'integer', + 'is_custom' => 'boolean', + ]; + } + /** * @param null|string|boll $a comment * @return null|string|boll comment diff --git a/tests/Fixtures/Ruleset/realodixspec_expected.php b/tests/Fixtures/Ruleset/realodixspec_expected.php index e73b89f..a80412d 100644 --- a/tests/Fixtures/Ruleset/realodixspec_expected.php +++ b/tests/Fixtures/Ruleset/realodixspec_expected.php @@ -66,6 +66,19 @@ public function comment() // } + /** + * Get the attributes that should be cast. + * + * @return array{user_id:'integer',is_custom:'boolean'} + */ + protected function casts(): array + { + return [ + 'user_id' => 'integer', + 'is_custom' => 'boolean', + ]; + } + /** * @param string|boll|null $a comment * @return string|boll|null comment diff --git a/tests/Fixtures/Ruleset/relax-custom_actual.php b/tests/Fixtures/Ruleset/relax-custom_actual.php index 4f7b156..800ff02 100644 --- a/tests/Fixtures/Ruleset/relax-custom_actual.php +++ b/tests/Fixtures/Ruleset/relax-custom_actual.php @@ -10,11 +10,6 @@ class RelaxCustom */ private $instance; - /** - * @var array - */ - private $phpdocTypesCommaSpacesFixer; - /** Hello * World! */ diff --git a/tests/Fixtures/Ruleset/relax-custom_expected.php b/tests/Fixtures/Ruleset/relax-custom_expected.php index e80207a..011a92b 100644 --- a/tests/Fixtures/Ruleset/relax-custom_expected.php +++ b/tests/Fixtures/Ruleset/relax-custom_expected.php @@ -9,11 +9,6 @@ class RelaxCustom */ private $instance; - /** - * @var array - */ - private $phpdocTypesCommaSpacesFixer; - /** * Hello * World!