Skip to content

Commit a2687bc

Browse files
committed
add some comments
1 parent 54f2219 commit a2687bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Codegen/Codegen.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,16 @@ public function getFile(): CodegenFile {
309309
}
310310

311311
public function getClassName(): string {
312+
// Whether or not we're generating a unique ref,
313+
// we'll always end up outputting a new class.
312314
return $this->generateClassName($this->class->getName());
313315
}
314316

315317
public function getType(): string {
316318
if ($this->builder->isUniqueRef()) {
319+
// Generating an alias to a unique ref.
320+
// Don't re-use the referenced type's name; instead,
321+
// generate a new type pointing to it.
317322
return $this->generateTypeName($this->getClassName());
318323
} else {
319324
return $this->builder->getType();

0 commit comments

Comments
 (0)