Skip to content

Commit

Permalink
PhpdocAlignFixer: fix property-read/property-write descriptions not g…
Browse files Browse the repository at this point in the history
…etting aligned
  • Loading branch information
antichris authored and SpacePossum committed Dec 15, 2021
1 parent 00096f0 commit 9e13590
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/Fixer/Phpdoc/PhpdocAlignFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ final class PhpdocAlignFixer extends AbstractFixer implements ConfigurableFixerI
private const TAGS_WITH_NAME = [
'param',
'property',
'property-read',
'property-write',
];

private const TAGS_WITH_METHOD_SIGNATURE = [
Expand Down
12 changes: 6 additions & 6 deletions tests/Fixer/Phpdoc/PhpdocAlignFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1227,17 +1227,17 @@ public function sample2($a, $b, ...$c)
['tags' => ['property', 'property-read', 'property-write']],
'<?php
/**
* @property string $myMagicProperty
* @property-read string $myMagicReadyProperty
* @property-write string $myMagicWriteProperty
* @property string $myMagicProperty magic property
* @property-read string $myMagicReadProperty magic read-only property
* @property-write string $myMagicWriteProperty magic write-only property
*/
class Foo {}
',
'<?php
/**
* @property string $myMagicProperty
* @property-read string $myMagicReadyProperty
* @property-write string $myMagicWriteProperty
* @property string $myMagicProperty magic property
* @property-read string $myMagicReadProperty magic read-only property
* @property-write string $myMagicWriteProperty magic write-only property
*/
class Foo {}
',
Expand Down

0 comments on commit 9e13590

Please sign in to comment.