Skip to content

Commit 5734157

Browse files
authored
skip all but vars (#69)
1 parent 53fa635 commit 5734157

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Fixer/Annotation/RemovePropertyVariableNameDescriptionFixer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ public function fix(SplFileInfo $fileInfo, Tokens $tokens): void
7373

7474
$docblockLines = explode("\n", $originalDocContent);
7575
foreach ($docblockLines as $key => $docblockLine) {
76+
if (! str_contains($docblockLine, '@var')) {
77+
continue;
78+
}
79+
7680
if (! str_ends_with($docblockLine, ' ' . $propertyName)) {
7781
continue;
7882
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Symplify\CodingStandard\Tests\Fixer\Annotation\RemovePropertyVariableNameDescriptionFixer\Fixture;
4+
5+
final class SkipParam
6+
{
7+
/**
8+
* @param string $name
9+
*/
10+
public function run($name)
11+
{
12+
}
13+
}

0 commit comments

Comments
 (0)