Skip to content

Commit 82ae5fd

Browse files
committed
PhpNamespace::add*() - removed checking whether class already exists - to be consistent with the rest of package (BC break)
1 parent 6fed24b commit 82ae5fd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/PhpGenerator/PhpNamespace.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ public function unresolveName(string $name): string
147147

148148
public function addClass(string $name): ClassType
149149
{
150-
if (isset($this->classes[$name])) {
151-
throw new Nette\InvalidArgumentException("Class $name was already added.");
152-
}
153150
$this->addUse($this->name . '\\' . $name);
154151
return $this->classes[$name] = new ClassType($name, $this);
155152
}

0 commit comments

Comments
 (0)