Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1bec9b6

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /