src/Recursivity/Tree/Node.php
public function getSiblings($includeSelf = false)
    {
        $siblings = array();
        foreach ($this->parent->getChildren() as $child) {
            if ($includeSelf || $child->getId() != $this->getId()) {
                $siblings[] = $child;
            }
        }
        return $siblings;
    }
public function getSiblings($includeSelf = false)
    {
        $siblings = array();
        foreach ($this->parent->getChildren() as $child) {
            if ($includeSelf || $child->getId() != $this->getId()) {
                $siblings[] = $child;
            }
        }
        return $siblings;
    }
public function getSiblings ( $ includeSelf = false ) { $ siblings = array ( ) ; foreach ( $ this -> parent -> getChildren ( ) as $ child ) { if ( $ includeSelf || $ child -> getId ( ) != $ this -> getId ( ) ) { $ siblings [ ] = $ child ; } } return $ siblings ; }
Returns siblings of the node, optionally including the node itself.

@param bool $includeSelf If true, the node itself will be included in the resulting
array. In either case, the sort order will be correct.
This argument is deprecated and will be removed in v2.0

Note: The argument is deprecated and will be removed in version 2; please
use getSiblingsAndSelf().

@return Node[]
Returns siblings of the node optionally including the node itself .