/**
 * Returns the right or left sibling of a node
 *
 * @param   boolean  $right  If set to false, returns the left sibling
 *
 * @return  NodeInterface|null  NodeInterface object of the sibling.
 *
 * @since   4.0.0
 */
public function getSibling($right = true)
{
    if ($right) {
        return $this->_rightSibling;
    } else {
        return $this->_leftSibling;
    }
}