diff --git a/src/RuleSet/Sets/Relax.php b/src/RuleSet/Sets/Relax.php index 7febd0e..635fd5f 100644 --- a/src/RuleSet/Sets/Relax.php +++ b/src/RuleSet/Sets/Relax.php @@ -74,7 +74,9 @@ public function mainRules(): array 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments']], 'unary_operator_spaces' => ['only_dec_inc' => true], 'whitespace_after_comma_in_array' => ['ensure_single_space' => true], - 'phpdoc_align' => ['tags' => ['method', 'param', 'property', 'throws', 'type', 'var']], + 'phpdoc_align' => [ + 'tags' => ['method', 'param', 'property', 'property-read', 'property-write', 'throws', 'type', 'var'], + ], 'phpdoc_separation' => [ 'groups' => [ ['param', 'param-out', 'return'], ['var', 'readonly'], diff --git a/tests/Fixtures/Ruleset/relax-commonbox_actual.php b/tests/Fixtures/Ruleset/relax-commonbox_actual.php index e7141c3..3ee3a79 100644 --- a/tests/Fixtures/Ruleset/relax-commonbox_actual.php +++ b/tests/Fixtures/Ruleset/relax-commonbox_actual.php @@ -13,6 +13,22 @@ protected function foo() } } +/** + * phpdoc_align + * + * @property int $a + * @property-read null|int $b + * @property-write string $c + */ +class PhpdocAlign +{ + /** + * @param string $a + * @param int $b + */ + public function phpdoc__phpdoc_align($a, $b) {} +} + /** * braces_position */ diff --git a/tests/Fixtures/Ruleset/relax-commonbox_expected.php b/tests/Fixtures/Ruleset/relax-commonbox_expected.php index b2fd0a9..0e73f04 100644 --- a/tests/Fixtures/Ruleset/relax-commonbox_expected.php +++ b/tests/Fixtures/Ruleset/relax-commonbox_expected.php @@ -8,6 +8,22 @@ class NoBlankLinesAfterClassOpening protected function foo() {} } +/** + * phpdoc_align + * + * @property int $a + * @property-read null|int $b + * @property-write string $c + */ +class PhpdocAlign +{ + /** + * @param string $a + * @param int $b + */ + public function phpdoc__phpdoc_align($a, $b) {} +} + /** * braces_position */ diff --git a/tests/Fixtures/Ruleset/relax_actual.php b/tests/Fixtures/Ruleset/relax_actual.php index aa6994c..c4c78de 100644 --- a/tests/Fixtures/Ruleset/relax_actual.php +++ b/tests/Fixtures/Ruleset/relax_actual.php @@ -430,12 +430,6 @@ public function phpdoc__no_empty_phpdoc() */ public function phpdoc__no_superfluous_phpdoc_tags($foo /*, $hidden_params = null */) {} - /** - * @param string $a - * @param int $b - */ - public function phpdoc__phpdoc_align($a, $b) {} - /** * @internal * @access private diff --git a/tests/Fixtures/Ruleset/relax_expected.php b/tests/Fixtures/Ruleset/relax_expected.php index 879548e..d7e342c 100644 --- a/tests/Fixtures/Ruleset/relax_expected.php +++ b/tests/Fixtures/Ruleset/relax_expected.php @@ -426,12 +426,6 @@ public function phpdoc__no_empty_phpdoc() {} */ public function phpdoc__no_superfluous_phpdoc_tags($foo /* , $hidden_params = null */) {} - /** - * @param string $a - * @param int $b - */ - public function phpdoc__phpdoc_align($a, $b) {} - /** * @internal */