Skip to content

Commit 98cdb30

Browse files
committed
In case of multiple comments, use the last one as reflection getDocComment
1 parent 31844b1 commit 98cdb30

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"nette/utils": "^3.1.1",
2222
"nikic/php-parser": "^4.5.0",
2323
"ondram/ci-detector": "^3.1",
24-
"ondrejmirtes/better-reflection": "^4.3.6",
24+
"ondrejmirtes/better-reflection": "^4.3.7",
2525
"phpdocumentor/type-resolver": "1.0.1",
2626
"phpstan/phpdoc-parser": "^0.4.7",
2727
"react/child-process": "^0.6.1",

tests/PHPStan/Rules/Properties/MissingPropertyTypehintRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,9 @@ public function testRule(): void
4949
]);
5050
}
5151

52+
public function testBug3402(): void
53+
{
54+
$this->analyse([__DIR__ . '/data/bug-3402.php'], []);
55+
}
56+
5257
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Bug3402;
4+
5+
class Foo
6+
{
7+
8+
/** Some comment */
9+
/** @var self */
10+
private $foo;
11+
12+
}

0 commit comments

Comments
 (0)