1
0
Fork 0

Simplified the code

pull/1067/head
Christophe Coevoet 2012-09-05 22:56:59 +02:00
parent d0faa016c1
commit 9e372b1d8b
4 changed files with 3 additions and 7 deletions

View File

@ -190,10 +190,6 @@ class Installer
foreach ($this->suggestedPackages as $suggestion) { foreach ($this->suggestedPackages as $suggestion) {
$target = $suggestion['target']; $target = $suggestion['target'];
if ($installedRepo->filterPackages(function (PackageInterface $package) use ($target) { if ($installedRepo->filterPackages(function (PackageInterface $package) use ($target) {
// check the name first as it is the common case
if ($package->getName() === $target) {
return false;
}
if (in_array($target, $package->getNames())) { if (in_array($target, $package->getNames())) {
return false; return false;
} }

View File

@ -1,5 +1,5 @@
--TEST-- --TEST--
Suggestions are not displayed for installed packages if they are also installed Suggestions are not displayed for installed packages
--COMPOSER-- --COMPOSER--
{ {
"repositories": [ "repositories": [

View File

@ -1,5 +1,5 @@
--TEST-- --TEST--
Suggestions are not displayed for installed packages if they are replaced Suggestions are not displayed for packages if they are replaced
--COMPOSER-- --COMPOSER--
{ {
"repositories": [ "repositories": [

View File

@ -1,5 +1,5 @@
--TEST-- --TEST--
Suggestions are displayed for installed packages Suggestions are displayed
--COMPOSER-- --COMPOSER--
{ {
"repositories": [ "repositories": [