src/Collection/Tree/RedBlackSearchTree.php
protected function isRed(?RedBlackNode $node): bool
    {
        if ($node === null) {
            return false;
        }

        return $node->color() === RedBlackNode::RED;
    }
protected function isRed(?RedBlackNode $node): bool
    {
        if ($node === null) {
            return false;
        }

        return $node->color() === RedBlackNode::RED;
    }
protected function isRed ( ? RedBlackNode $ node ) : bool { if ( $ node === null ) { return false ; } return $ node -> color ( ) === RedBlackNode :: RED ; }
Checks if a node is red

@param RedBlackNode|null $node The node

@return bool
Checks if a node is red