Explorar o código

Use elseif instead of else { if {

Nils Adermann %!s(int64=11) %!d(string=hai) anos
pai
achega
83159dc153
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      src/Composer/DependencyResolver/Pool.php

+ 2 - 4
src/Composer/DependencyResolver/Pool.php

@@ -274,10 +274,8 @@ class Pool
             if (isset($this->packageByExactName[$name])) {
                 $candidates = array_merge($candidates, $this->packageByExactName[$name]);
             }
-        } else {
-            if (isset($this->packageByName[$name])) {
-                $candidates = array_merge($candidates, $this->packageByName[$name]);
-            }
+        } elseif (isset($this->packageByName[$name])) {
+            $candidates = array_merge($candidates, $this->packageByName[$name]);
         }
 
         $matches = $provideMatches = array();