Gets the name of the command based on input.

@param InputInterface $input The input interface

@return string The command name
320376
protected function getCommandName(InputInterface $input)
    {
        if ($input->getFirstArgument() === null && !$input->hasParameterOption(array('--help', '-h'))) {
            $this->isDefault = true;
            return $this->getDefaultCommandName();
        }
        return parent::getCommandName($input);
    }
261780
public function getRepoURL(InputInterface $input, OutputInterface $output)
    {
        return 'git@github.com:' . $this->gitHubUsername($input,$output) . '/' . $this->repoName($input) . '.git';
    }
346397
protected function getOptions(InputInterface $input)
    {
        return [
            'dir'    => (bool) $input->getOption('fix_dir'),
            'file'   => (bool) $input->getOption('fix_file'),
            'skip'   => (bool) $input->getOption('skip_dir_file'),
            'strict' => (bool) $input->getOption('strict_types'),
        ];
    }
1114929
protected function getInputClassName()
	{
		if (isset($this->input))
			return $this->input;
		else
		{
			switch ($this->type)
			{
				case self::TYPE_HORIZONTAL:
					return self::INPUT_HORIZONTAL;
					break;

				case self::TYPE_INLINE:
					return self::INPUT_INLINE;
					break;

				case self::TYPE_SEARCH:
					return self::INPUT_SEARCH;
					break;

				case self::TYPE_VERTICAL:
				default:
					return self::INPUT_VERTICAL;
					break;
			}
		}
	}
1278022
private function getUpdateData(InputInterface $input)
    {
        $update_data = $input->getOption('update-data');

        if (empty($update_data)) {
            return null;
        }

        if (mb_substr($update_data, 0, 1) == '{' && mb_substr($update_data, mb_strlen($update_data) - 1) == '}') {
            $update_data = json_decode($update_data, true);

            if (json_last_error()) {
                $error_message = 'Failed to parse JSON';

                if (function_exists('json_last_error_msg')) {
                    $error_message .= '. Reason: ' . json_last_error_msg();
                }

                throw new InvalidArgumentException('Failed to parse updata data value. Error: ' . $error_message);
            }

            return $update_data;
        } else {
            throw new InvalidArgumentException("Invalid JSON: '$update_data'");
        }
    }
862011
public function inputName()
    {
        if ($this->inputName) {
            $name = $this->inputName;
        } else {
            $name = $this->propertyIdent();
        }

        if ($this->p()->l10n()) {
            $name .= '['.$this->lang().']';
        }

        if ($this->multiple()) {
            $name .= '[]';
        }

        return $name;
    }
1222891
protected function getRoutePrefix(InputInterface $input, $document)
    {
        $prefix = $input->getOption('route-prefix') ?: strtolower(str_replace(array('\\', '/'), '_', $document));

        if ($prefix && '/' === $prefix[0]) {
            $prefix = substr($prefix, 1);
        }

        return $prefix;
    }
937215
protected function getOptions(InputInterface $input)
    {
        $options = $this->extras + [
            'queue' => $input->getArgument('queue'),
            'connection' => $input->getArgument('connection'),
            'poll_interval' => (int) $input->getOption('poll-interval'),
        ];

        /** @var ProcessorConfiguratorInterface $processorConfigurator */
        foreach ($this->processorConfigurators as $processorConfigurator) {
            $processorOptions = $processorConfigurator->resolveOptions($input);

            if ($processorConfigurator->isEnabled()) {
                $options += $processorOptions;
            }
        }

        return $options;
    }
1236718
protected function handle(CommandInterface $command)
	{
		if($command instanceof SelfHandlingCommandInterface)
		{
			return $command->handle();
		}

		$handler = $this->resolveCommandHandler($command);

		return $this->executeCommandHandler($handler, $command);
	}
139215
protected function getKeyFromAllArguments(CommandInterface $command)
    {
        $arguments = $command->getArguments();

        if ($this->checkSameSlotForKeys($arguments)) {
            return $arguments[0];
        }
    }
1235966
protected function getNameInput()
    {
        $name   = Str::studly($this->argument('name'));
        $suffix = $this->getNameSuffix();

        if ($suffix && !Str::endsWith($name, $suffix)) {
            $name .= $suffix;
        }

        return $name;
    }
1285989
protected function getCommand($input)
    {
        $input = new StringInput($input);
        if ($name = $input->getFirstArgument()) {
            return $this->get($name);
        }
    }
227191
private function generateOutput(InputInterface $input): OutputInterface
    {
        return new Output(
            $this->name,
            array_merge(
                $this->evaluateInputExports($input),
                $this->generateOutputParams($input)
            )
        );
    }
734045
protected function getComposerPathFromInput(InputInterface $input)
    {
        if ($input->getOption('directory')) {
            return $input->getOption('directory');
        }

        if ($input->getOption('global')) {
            return getenv('HOME').'/.composer';
        }
    }
183691
public function getParameter(InputInterface $input, $key)
    {
        $config = $this->getConfig();
        $adapter = $input->getOption('repo-adapter');

        if ($value = $config->get(['adapters', $adapter, $key])) {
            return $value;
        }

        return $config->get($key);
    }
174434
protected function execute(InputInterface $input, Output\OutputInterface $output)
    {
        foreach ($this->getDefinition()->getArguments() as $arg) {
            if ($arg->getName() === 'command') {
                continue;
            }
            if ($input->getArgument($arg->getName())) {
                $this->getContainer()->set(explode('.', $this->nameToVar($arg->getName())), $input->getArgument($arg->getName()));
            }
        }

        foreach ($this->opts as $opt) {
            if ($value = $input->getOption($this->varToName($opt))) {
                $this->getContainer()->set(explode('.', $opt), $value);
            }
        }

        foreach ($this->flags as $name => $value) {
            $varName = explode('.', $name);
            $optName = $this->varToName($name);
            $this->getContainer()->set($varName, $value);

            if ($input->getOption('no-' . $optName) && $input->getOption($optName)) {
                throw new \InvalidArgumentException("Conflicting options --no-{$optName} and --{$optName} supplied. That confuses me.");
            }
            if ($input->getOption('no-' . $optName)) {
                $this->getContainer()->set($varName, false);
            } elseif ($input->getOption($optName)) {
                $this->getContainer()->set($varName, true);
            }
        }

        $callable = $this->getContainer()->get($this->getTaskReference());
        call_user_func($callable, $this->getContainer());
    }
406218
protected function resolve(Input $input): Input
    {
        $this->call($input->value());
        $input->ignore();

        return $input;
    }