Skip to content

Commit

Permalink
pass context
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Sep 23, 2023
1 parent bca367a commit 9cbb301
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Parser/Popo.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected function parseClass(string $className, DefinitionsInterface $definitio
if ($type instanceof StructType) {
$parent = $class->getParentClass();
if ($parent instanceof \ReflectionClass) {
$extends = $this->parseClass($parent->getName(), $definitions);
$extends = $this->parseClass($parent->getName(), $definitions, $context);
if ($extends instanceof StructType) {
$type->setExtends($this->getTypeName($parent, $context));
}
Expand Down Expand Up @@ -340,7 +340,7 @@ private function parseRef(ReferenceType $type, DefinitionsInterface $definitions
$reflection = new ReflectionClass($className);
$type->setRef($this->getTypeName($reflection, $context));

$this->parseClass($className, $definitions);
$this->parseClass($className, $definitions, $context);
} catch (\ReflectionException $e) {
// in this case the class does not exist
}
Expand All @@ -352,7 +352,7 @@ private function parseRef(ReferenceType $type, DefinitionsInterface $definitions
try {
$reflection = new ReflectionClass($className);
$result[$key] = $this->getTypeName($reflection, $context);
$this->parseClass($className, $definitions);
$this->parseClass($className, $definitions, $context);
} catch (\ReflectionException $e) {
// in this case the class does not exist
}
Expand Down

0 comments on commit 9cbb301

Please sign in to comment.