some tiny refactorings
parent
3a1edd3776
commit
2b5a9aee6c
|
@ -15,8 +15,7 @@ namespace Composer\Command;
|
||||||
use Composer\DependencyResolver\Pool;
|
use Composer\DependencyResolver\Pool;
|
||||||
use Composer\Factory;
|
use Composer\Factory;
|
||||||
use Composer\Package\CompletePackageInterface;
|
use Composer\Package\CompletePackageInterface;
|
||||||
use Composer\Plugin\CommandEvent;
|
use Composer\Package\Loader\InvalidPackageException;
|
||||||
use Composer\Plugin\PluginEvents;
|
|
||||||
use Composer\Repository\CompositeRepository;
|
use Composer\Repository\CompositeRepository;
|
||||||
use Composer\Repository\RepositoryInterface;
|
use Composer\Repository\RepositoryInterface;
|
||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
@ -63,7 +62,7 @@ EOT
|
||||||
$url = isset($support['source']) ? $support['source'] : $package->getSourceUrl();
|
$url = isset($support['source']) ? $support['source'] : $package->getSourceUrl();
|
||||||
$this->openBrowser($url);
|
$this->openBrowser($url);
|
||||||
} else {
|
} else {
|
||||||
$output->writeln('no valid source-url given for ' . $package->getName());
|
throw new InvalidPackageException(array($package->getName() => 'invalid source-url'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,13 +134,6 @@ EOT
|
||||||
$repo = new CompositeRepository($defaultRepos);
|
$repo = new CompositeRepository($defaultRepos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($composer) {
|
|
||||||
$commandEvent = new CommandEvent(PluginEvents::COMMAND, 'home', $input, $output);
|
|
||||||
$composer->getEventDispatcher()->dispatch($commandEvent->getName(), $commandEvent);
|
|
||||||
|
|
||||||
return $repo;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $repo;
|
return $repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue