1
0
Fork 0

Remove unused selectNewestPackages method in DefaultPolicy

Unused as of 1b6f57e651
pull/3178/merge
Nils Adermann 2014-11-21 15:26:09 +01:00
parent edd4b2f984
commit 5333017aea
1 changed files with 0 additions and 20 deletions

View File

@ -215,26 +215,6 @@ class DefaultPolicy implements PolicyInterface
return $bestLiterals;
}
protected function selectNewestPackages(array $installedMap, array $literals)
{
$maxLiterals = array($literals[0]);
$maxPackage = $literals[0]->getPackage();
foreach ($literals as $i => $literal) {
if (0 === $i) {
continue;
}
if ($this->versionCompare($literal->getPackage(), $maxPackage, '>')) {
$maxPackage = $literal->getPackage();
$maxLiterals = array($literal);
} elseif ($this->versionCompare($literal->getPackage(), $maxPackage, '==')) {
$maxLiterals[] = $literal;
}
}
return $maxLiterals;
}
/**
* Assumes that installed packages come first and then all highest priority packages
*/