Skip to content

Commit f374216

Browse files
committed
TASK: Satisfy phpstan
1 parent 3d55c0c commit f374216

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/TypeSystem/Type/EnumType/EnumStaticType.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828

2929
final class EnumStaticType implements TypeInterface
3030
{
31+
/**
32+
* @param string $enumName
33+
* @param ModuleId $moduleId
34+
* @param array<string,bool> $memberNameHashMap
35+
*/
3136
public function __construct(
3237
public readonly string $enumName,
3338
private readonly ModuleId $moduleId,
@@ -49,6 +54,9 @@ enumName: $enumDeclarationNode->enumName,
4954
);
5055
}
5156

57+
/**
58+
* @return string[]
59+
*/
5260
public function getMemberNames(): array
5361
{
5462
return array_keys($this->memberNameHashMap);

test/Unit/TypeSystem/Resolver/Access/AccessTypeResolverTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737

3838
final class AccessTypeResolverTest extends TestCase
3939
{
40+
/**
41+
* @return iterable<mixed>
42+
*/
4043
public static function invalidAccessExamples(): iterable
4144
{
4245
yield 'access property on primitive string' => [
@@ -87,6 +90,7 @@ public function enumMemberAccessOnStaticEnum(): void
8790
);
8891

8992
$this->assertInstanceOf(EnumInstanceType::class, $accessType);
93+
assert($accessType instanceof EnumInstanceType);
9094

9195
$this->assertTrue($accessType->enumStaticType->is($someEnum));
9296

test/Unit/TypeSystem/Resolver/Match/MatchTypeResolverTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ public function resolvesMatchToResultingType(string $matchAsString, TypeInterfac
119119
);
120120
}
121121

122-
122+
/**
123+
* @return iterable<mixed>
124+
*/
123125
public static function malformedEnumExamples(): iterable
124126
{
125127
yield "Multiple default keys" => [

0 commit comments

Comments
 (0)