function Decisions::decisionRule
File
-
vendor/
composer/ composer/ src/ Composer/ DependencyResolver/ Decisions.php, line 97
Class
- Decisions
- Stores decisions on installing, removing or keeping packages
Namespace
Composer\DependencyResolverCode
public function decisionRule(int $literalOrPackageId) : Rule {
$packageId = abs($literalOrPackageId);
foreach ($this->decisionQueue as $decision) {
if ($packageId === abs($decision[self::DECISION_LITERAL])) {
return $decision[self::DECISION_REASON];
}
}
throw new \LogicException('Did not find a decision rule using ' . $literalOrPackageId);
}