Skip to content

Commit

Permalink
Fix namespace import for references
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrokeil committed Dec 9, 2020
1 parent e564918 commit dc356f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ public function generateClasses(
$propertyType->name()
);
$propertyClassName = ($this->classNameFilter)($propertyType->name());
$classBuilder->addNamespaceImport($classNamespace . '\\' . $propertyClassName);
}
$classBuilder->addProperty(
ClassPropertyBuilder::fromScratch(
$propertyPropertyName,
$propertyType->isNullable() ? ('?' . $propertyClassName) : $propertyClassName
)
);
$classBuilder->addNamespaceImport($classNamespace . '\\' . $propertyClassName);
break;
case $propertyType instanceof ScalarType:
$classBuilderCollection->add(
Expand Down

0 comments on commit dc356f7

Please sign in to comment.