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

        if (!$this->isRed($node->left()) && !$this->isRed($node->left()->left())) {
            $node = $this->moveRedLeft($node);
        }

        $node->setLeft($this->nodeRemoveMin($node->left()));

        return $this->balanceOnRemove($node);
    }