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

Breadcrumb

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

function RuleWatchChain::remove

Removes the current element from the list

As SplDoublyLinkedList only allows deleting a particular offset and incorrectly sets the internal iterator if you delete the current value this method sets the internal iterator back to the following element using the seek method.

File

vendor/composer/composer/src/Composer/DependencyResolver/RuleWatchChain.php, line 45

Class

RuleWatchChain
An extension of SplDoublyLinkedList with seek and removal of current element

Namespace

Composer\DependencyResolver

Code

public function remove() : void {
    $offset = $this->key();
    $this->offsetUnset($offset);
    $this->seek($offset);
}

API Navigation

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