private function addCommand(CommandConfig $config)
{
if (!$config->isEnabled()) {
return;
}
$this->validateCommandName($config);
$command = new Command($config, $this);
$this->commands->add($command);
if ($config->isDefault()) {
$this->defaultCommands->add($command);
}
if (!$config->isAnonymous()) {
$this->namedCommands->add($command);
}
}