1
0
Fork 0

Merge pull request #199 from hhamon/dead_code_cleanup

Dead code cleanup
pull/201/head
Jordi Boggiano 2012-01-11 05:53:26 -08:00
commit 91a4e5209a
11 changed files with 8 additions and 15 deletions

View File

@ -63,7 +63,6 @@ EOT
$needle = $input->getArgument('package');
$references = array();
$recommendedDependencies = array();
// check if we have a local installation so we can grab the right package/version
$repos = array_merge(

View File

@ -53,9 +53,8 @@ EOT
protected function execute(InputInterface $input, OutputInterface $output)
{
$composer = $this->getComposer();
$installCommand = $this->getApplication()->find('install');
return $installCommand->install($input, $output, true);
}
}

View File

@ -1078,9 +1078,7 @@ class Solver
protected function createTransaction()
{
$transaction = array();
$installMeansUpdateMap = array();
$ignoreRemoveMap = array();
foreach ($this->decisionQueue as $i => $literal) {
$package = $literal->getPackage();
@ -1739,7 +1737,7 @@ class Solver
$level = 1;
$systemLevel = $level + 1;
$minimizationsteps = 0;
$minimizationSteps = 0;
$installedPos = 0;
$this->installedPackages = $this->installed->getPackages();
@ -1930,7 +1928,7 @@ class Solver
$installedPos = 0;
}
$systemlevel = $level + 1;
$systemLevel = $level + 1;
if ($pass < 2) {
// had trouble => retry

View File

@ -75,7 +75,7 @@ abstract class FileDownloader implements DownloaderInterface
),
));
copy($url, $filename, $ctx);
copy($url, $fileName, $ctx);
} else {
copy($url, $fileName);
}

View File

@ -44,7 +44,6 @@ class RootPackageLoader extends ArrayLoader
$package = parent::load($config);
if (isset($config['repositories'])) {
$repositories = array();
foreach ($config['repositories'] as $repoName => $repo) {
if (false === $repo && 'packagist' === $repoName) {
continue;

View File

@ -112,7 +112,7 @@ class VersionParser
if (count($constraints) > 1) {
$constraintObjects = array();
foreach ($constraints as $key => $constraint) {
foreach ($constraints as $constraint) {
$constraintObjects = array_merge($constraintObjects, $this->parseConstraint($constraint));
}
} else {

View File

@ -102,7 +102,6 @@ class PearRepository extends ArrayRepository
}
$deps = unserialize($deps);
if (isset($deps['required']['package'])) {
$requires = array();
if (isset($deps['required']['package']['name'])) {
$deps['required']['package'] = array($deps['required']['package']);

View File

@ -158,6 +158,6 @@ class GitBitbucketDriver implements VcsDriverInterface
*/
public static function supports($url, $deep = false)
{
return preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url, $match);
return preg_match('#^https://bitbucket\.org/([^/]+)/(.+?)\.git$#', $url);
}
}

View File

@ -146,6 +146,6 @@ class GitHubDriver implements VcsDriverInterface
*/
public static function supports($url, $deep = false)
{
return extension_loaded('openssl') && preg_match('#^(?:https?|git)://github\.com/([^/]+)/(.+?)(?:\.git)?$#', $url, $match);
return extension_loaded('openssl') && preg_match('#^(?:https?|git)://github\.com/([^/]+)/(.+?)(?:\.git)?$#', $url);
}
}

View File

@ -158,6 +158,6 @@ class HgBitbucketDriver implements VcsDriverInterface
*/
public static function supports($url, $deep = false)
{
return preg_match('#^https://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url, $match);
return preg_match('#^https://bitbucket\.org/([^/]+)/([^/]+)/?$#', $url);
}
}

View File

@ -70,7 +70,6 @@ class VcsRepository extends ArrayRepository
$versionParser = new VersionParser;
$loader = new ArrayLoader();
$versions = array();
if ($driver->hasComposerFile($driver->getRootIdentifier())) {
$data = $driver->getComposerInformation($driver->getRootIdentifier());