소스 검색

Remove duplicate function from decisions

Nils Adermann 13 년 전
부모
커밋
76f8642feb
2개의 변경된 파일1개의 추가작업 그리고 11개의 파일을 삭제
  1. 0 10
      src/Composer/DependencyResolver/Decisions.php
  2. 1 1
      src/Composer/DependencyResolver/RuleWatchGraph.php

+ 0 - 10
src/Composer/DependencyResolver/Decisions.php

@@ -46,16 +46,6 @@ class Decisions implements \Iterator, \Countable
         );
     }
 
-    public function contain($literal)
-    {
-        $packageId = abs($literal);
-
-        return (
-            $this->decisionMap[$packageId] > 0 && $literal > 0 ||
-            $this->decisionMap[$packageId] < 0 && $literal < 0
-        );
-    }
-
     public function satisfy($literal)
     {
         $packageId = abs($literal);

+ 1 - 1
src/Composer/DependencyResolver/RuleWatchGraph.php

@@ -94,7 +94,7 @@ class RuleWatchGraph
             $node = $chain->current();
             $otherWatch = $node->getOtherWatch($literal);
 
-            if (!$node->getRule()->isDisabled() && !$decisions->contain($otherWatch)) {
+            if (!$node->getRule()->isDisabled() && !$decisions->satisfy($otherWatch)) {
                 $ruleLiterals = $node->getRule()->getLiterals();
 
                 $alternativeLiterals = array_filter($ruleLiterals, function ($ruleLiteral) use ($literal, $otherWatch, $decisions) {