Skip to content

Commit 15ee323

Browse files
committed
Optimization
1 parent 0c9d0bf commit 15ee323

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Analyser/NameScope.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ public function resolveTemplateTypeName(string $name): ?Type
114114

115115
public function withTemplateTypeMap(TemplateTypeMap $map): self
116116
{
117+
if ($map->isEmpty()) {
118+
return $this;
119+
}
120+
117121
return new self(
118122
$this->namespace,
119123
$this->uses,

0 commit comments

Comments
 (0)