Code cleanup

main
Jordi Boggiano 12 years ago
parent 8654c43c62
commit 61708a1bb1

@ -65,10 +65,8 @@ EOT
protected function execute(InputInterface $input, OutputInterface $output)
{
$io = $this->getIO();
return $this->installProject(
$io,
$this->getIO(),
$input->getArgument('package'),
$input->getArgument('directory'),
$input->getArgument('version'),
@ -85,11 +83,11 @@ EOT
}
if (null === $repositoryUrl) {
$sourceRepo = new ComposerRepository(array('url' => 'http://packagist.org'), $this->getIO());
$sourceRepo = new ComposerRepository(array('url' => 'http://packagist.org'), $io);
} elseif (".json" === substr($repositoryUrl, -5)) {
$sourceRepo = new FilesystemRepository(new JsonFile($repositoryUrl, new RemoteFilesystem($io)));
} elseif (0 === strpos($repositoryUrl, 'http')) {
$sourceRepo = new ComposerRepository(array('url' => $repositoryUrl), $this->getIO());
$sourceRepo = new ComposerRepository(array('url' => $repositoryUrl), $io);
} else {
throw new \InvalidArgumentException("Invalid repository url given. Has to be a .json file or an http url.");
}

Loading…
Cancel
Save