Skip to content

Commit e636966

Browse files
committed
chore: sync annotations between stubs
1 parent 95ad39c commit e636966

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

stubs/ReflectionClassWithLazyObjects.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class ReflectionClass
114114
/**
115115
* @phpstan-assert-if-true class-string<\UnitEnum> $this->name
116116
* @phpstan-assert-if-true class-string<\UnitEnum> $this->getName()
117+
* @phpstan-assert-if-true ReflectionClass<UnitEnum> $this
117118
* @return (T is \UnitEnum ? true: false)
118119
*/
119120
public function isEnum(): bool

tests/PHPStan/Analyser/nsrt/reflectionclass-isEnum.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ function testNarrowClassAfterIsEnum(string $class): void {
1414
assertType('class-string<UnitEnum>', $r->name);
1515
assertType('class-string<UnitEnum>', $r->getName());
1616

17+
assertType('UnitEnum', $r->newInstance());
18+
1719

1820
// Todo:
1921
//assertType('ReflectionClass<UnitEnum>', $r);

0 commit comments

Comments
 (0)