Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2021-12-14 00:34:54 +00:00
10 changed files with 68 additions and 22 deletions

View File

@ -72,7 +72,8 @@ final class GeneratorManager{
public function addGenerator(string $class, string $name, \Closure $presetValidator, bool $overwrite = false) : void{
Utils::testValidInstance($class, Generator::class);
if(!$overwrite and isset($this->list[$name = strtolower($name)])){
$name = strtolower($name);
if(!$overwrite and isset($this->list[$name])){
throw new \InvalidArgumentException("Alias \"$name\" is already assigned");
}