Skip to content

Commit 1bec9b6

Browse files
committed
Test annotation property
1 parent a25b82d commit 1bec9b6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php // lint >= 8.2
2+
3+
namespace PropertyPhpDocTagPrivateProperty;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
/**
8+
* @property non-empty-string $bar
9+
* @property non-empty-string $baz
10+
*/
11+
class Foo
12+
{
13+
14+
private string $bar;
15+
16+
public string $baz;
17+
18+
}
19+
20+
function (Foo $foo): void {
21+
assertType('string', $foo->bar);
22+
assertType('non-empty-string', $foo->baz);
23+
};

0 commit comments

Comments
 (0)