We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54f2219 commit a2687bcCopy full SHA for a2687bc
src/Codegen/Codegen.php
@@ -309,11 +309,16 @@ public function getFile(): CodegenFile {
309
}
310
311
public function getClassName(): string {
312
+ // Whether or not we're generating a unique ref,
313
+ // we'll always end up outputting a new class.
314
return $this->generateClassName($this->class->getName());
315
316
317
public function getType(): string {
318
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.
322
return $this->generateTypeName($this->getClassName());
323
} else {
324
return $this->builder->getType();
0 commit comments