Skip to content

Commit 67d47f7

Browse files
committed
add explanatory comment
1 parent 453d041 commit 67d47f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Codegen/Codegen.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ public function isArrayKeyType(): bool {
331331
}
332332

333333
public function getTypeInfo(): Typing\Type {
334+
// If we're referencing a different schema, always generate an alias.
335+
// Otherwise, simply delegate to the builder, which may or may not
336+
// build an alias itself (e.g., in the case of ObjectBuilder).
334337
if ($this->builder->isUniqueRef()) {
335338
return Typing\TypeSystem::alias($this->builder->getType());
336339
}

0 commit comments

Comments
 (0)