Skip to content

Commit 366e72a

Browse files
committed
feat: pass class reflection to ObjectType and EnumCaseObjectType
1 parent e7d3e6b commit 366e72a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Reflection/ClassReflection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,12 +1425,13 @@ public function getAttributeClassFlags(): int
14251425
public function getObjectType(): ObjectType
14261426
{
14271427
if (!$this->isGeneric()) {
1428-
return new ObjectType($this->getName());
1428+
return new ObjectType($this->getName(), classReflection: $this);
14291429
}
14301430

14311431
return new GenericObjectType(
14321432
$this->getName(),
14331433
$this->typeMapToList($this->getActiveTemplateTypeMap()),
1434+
classReflection: $this,
14341435
variances: $this->varianceMapToList($this->getCallSiteVarianceMap()),
14351436
);
14361437
}

src/Reflection/EnumCaseReflection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function getEnumCaseObjectType(): EnumCaseObjectType
6161
return new EnumCaseObjectType(
6262
$this->declaringEnum->getName(),
6363
$this->getName(),
64+
$this->declaringEnum,
6465
);
6566
}
6667

0 commit comments

Comments
 (0)