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\DependencyResolverCode
public function remove() : void {
$offset = $this->key();
$this->offsetUnset($offset);
$this->seek($offset);
}