Skip to content

Commit bc0a19b

Browse files
[allow-dynamic-calls] Add test case for edge case "use class-string<enum> for static access"
1 parent 032f7fe commit bc0a19b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/integration/data/EnumGetValuesReturnType.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66

77
class Example
88
{
9+
/** @var class-string<Enum> */
10+
protected $enumClass = Enum::class;
11+
12+
/** @return array<int, float|int|string> */
13+
public function getDynamicValues(): array
14+
{
15+
return $this->enumClass::getValues();
16+
}
17+
918
/** @return array<int, null> */
1019
public static function baseMethodValid(): array
1120
{

0 commit comments

Comments
 (0)