/**
* Loads a command.
*
* @param string $name The command to load.
*
* @return AbstractCommand
*
* @since 4.0.0
* @throws CommandNotFoundException
*/
public function get(string $name) : AbstractCommand
{
if (!$this->has($name)) {
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
}
return $this->container->get($this->commandMap[$name]);
}