/** * Normalises the input for the command by merging input with configuration. * * @param InputInterface $input * @param ConfigurationInterface $config * @return RepositoryInterface */ private function prepareRepository($input, $config) { return new Repository(['name' => $input->getArgument('name'), 'description' => $this->getOption($input, 'description', ''), 'private' => $this->getOption($input, 'private', true), 'account' => $this->getOption($input, 'account', $config->get('account')), 'type' => $this->getOption($input, 'type', $config->get('type')), 'service' => $this->getOption($input, 'service', $config->get('service')), 'username' => $this->getOption($input, 'username', $config->get('username')), 'password' => $this->getOption($input, 'password', $config->get('password'))]); }
/** * Normalises the input for the command by merging input with configuration. * * @param InputInterface $input * @param ConfigurationInterface $config * @return RepositoryInterface */ private function prepareRepository($input, $config) { $repo = explode('/', $input->getArgument('name')); return new Repository(['name' => $repo[1], 'description' => $this->getOption($input, 'description', ''), 'private' => $this->getOption($input, 'private', true), 'account' => isset($repo[0]) ? $repo[0] : $config->get('account')]); }