src/Collection/Tree/RedBlackSearchTree.php
protected function moveRedRight(RedBlackNode $node): RedBlackNode
    {
        $this->flipColors($node);
        if ($this->isRed($node->left()->left())) {
            $node = $this->rotateRight($node);
            $this->flipColors($node);
        }

        return $node;
    }
protected function moveRedRight(RedBlackNode $node): RedBlackNode
    {
        $this->flipColors($node);
        if ($this->isRed($node->left()->left())) {
            $node = $this->rotateRight($node);
            $this->flipColors($node);
        }

        return $node;
    }
protected function moveRedRight ( RedBlackNode $ node ) : RedBlackNode { $ this -> flipColors ( $ node ) ; if ( $ this -> isRed ( $ node -> left ( ) -> left ( ) ) ) { $ node = $ this -> rotateRight ( $ node ) ; $ this -> flipColors ( $ node ) ; } return $ node ; }
Makes a right link or child red

Assumes red $node and $node->right and $node->right->left are black.

@codeCoverageIgnore

@param RedBlackNode $node The node

@return RedBlackNode
Makes a right link or child red