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

Breadcrumb

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

function RuleWatchNode::getOtherWatch

Given one watched literal, this method returns the other watched literal

Parameters

int $literal The watched literal that should not be returned:

Return value

int A literal

File

vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchNode.php, line 91

Class

RuleWatchNode
Wrapper around a Rule which keeps track of the two literals it watches

Namespace

Composer\DependencyResolver

Code

public function getOtherWatch(int $literal) : int {
    if ($this->watch1 === $literal) {
        return $this->watch2;
    }
    return $this->watch1;
}

API Navigation

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