public function defaults(array $defaults = [])
    {
        $definition = $this->getDefinition();

        foreach ($defaults as $name => $default) {
            if ($definition->hasArgument($name)) {
                $input = $definition->getArgument($name);
            } elseif ($definition->hasOption($name)) {
                $input = $definition->getOption($name);
            } else {
                throw new \InvalidArgumentException(
                    "Unable to set default for [{$name}]. It does not exist as an argument or option."
                );
            }

            $input->setDefault($default);
        }

        return $this;
    }