The hasSibling() method checks if a given node is a sibling of the target node.
Description
public AbstractNode::hasSibling(NodeInterface $siblingNode): bool
Parameters
siblingNode
The NodeInterface instance to check for sibling relationship with the target node.
Return Value
Returns true if the specified node is a sibling of the target node; otherwise, returns false.
Exception
None