Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Decisions.php

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\DependencyResolver

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal