src/Collection/Tree/RedBlackSearchTree.php
protected function nodeRemoveLeft($key, RedBlackNode $node): RedBlackNode
    {
        if (!$this->isRed($node->left()) && !$this->isRed($node->left()->left())) {
            $node = $this->moveRedLeft($node);
        }
        $node->setLeft($this->nodeRemove($key, $node->left()));

        return $node;
    }
protected function nodeRemoveLeft($key, RedBlackNode $node): RedBlackNode
    {
        if (!$this->isRed($node->left()) && !$this->isRed($node->left()->left())) {
            $node = $this->moveRedLeft($node);
        }
        $node->setLeft($this->nodeRemove($key, $node->left()));

        return $node;
    }
protected function nodeRemoveLeft ( $ key , RedBlackNode $ node ) : RedBlackNode { if ( ! $ this -> isRed ( $ node -> left ( ) ) && ! $ this -> isRed ( $ node -> left ( ) -> left ( ) ) ) { $ node = $ this -> moveRedLeft ( $ node ) ; } $ node -> setLeft ( $ this -> nodeRemove ( $ key , $ node -> left ( ) ) ) ; return $ node ; }
Deletes a node to the left by key and subtree

@internal Helper for nodeRemove()

@param mixed        $key  The key
@param RedBlackNode $node The subtree root

@return RedBlackNode
Deletes a node to the left by key and subtree