public function add(ICommand $command, bool $overwrite = false)
    {
        if (!$overwrite && $this->has($command->getName())) {
            throw new InvalidArgumentException("A command with name \"{$command->getName()}\" already exists");
        }

        $command->setCommandCollection($this);
        $this->commands[$command->getName()] = $command;
    }