src/Collection/Tree/RedBlackSearchTree.php
protected function nodeMin(RedBlackNode $node): RedBlackNode
    {
        if ($node->left() === null) {
            return $node;
        }

        return $this->nodeMin($node->left());
    }
protected function nodeMin(RedBlackNode $node): RedBlackNode
    {
        if ($node->left() === null) {
            return $node;
        }

        return $this->nodeMin($node->left());
    }
protected function nodeMin ( RedBlackNode $ node ) : RedBlackNode { if ( $ node -> left ( ) === null ) { return $ node ; } return $ this -> nodeMin ( $ node -> left ( ) ) ; }
Retrieves the node with the minimum key in a subtree

@param RedBlackNode $node The subtree root

@return RedBlackNode
Retrieves the node with the minimum key in a subtree