Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpdocAlignFixer: fix property-read/property-write descriptions not getting aligned #6174

Merged
merged 1 commit into from Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Fixer/Phpdoc/PhpdocAlignFixer.php
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
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