protected function isParentOrRoot($value): bool
    {
        $id = spl_object_hash($value);
        $root = $this->root ? $this->root->getWrappedEntity()->getObject() : null;
        $parent = $this->parent ? $this->parent->getWrappedEntity()->getObject() : null;

        if ($parent && (spl_object_hash($parent) == $id)) {
            return true;
        }

        if ($root && (spl_object_hash($root) == $id)) {
            return true;
        }

        return false;
    }
protected function isParentOrRoot($value): bool
    {
        $id = spl_object_hash($value);
        $root = $this->root ? $this->root->getWrappedEntity()->getObject() : null;
        $parent = $this->parent ? $this->parent->getWrappedEntity()->getObject() : null;

        if ($parent && (spl_object_hash($parent) == $id)) {
            return true;
        }

        if ($root && (spl_object_hash($root) == $id)) {
            return true;
        }

        return false;
    }
protected function isParentOrRoot ( $ value ) : bool { $ id = spl_object_hash ( $ value ) ; $ root = $ this -> root ? $ this -> root -> getWrappedEntity ( ) -> getObject ( ) : null ; $ parent = $ this -> parent ? $ this -> parent -> getWrappedEntity ( ) -> getObject ( ) : null ; if ( $ parent && ( spl_object_hash ( $ parent ) == $ id ) ) { return true ; } if ( $ root && ( spl_object_hash ( $ root ) == $ id ) ) { return true ; } return false ; }
Check if value isn't parent or root in the aggregate.

@param  mixed

@return bool
Check if value isn t parent or root in the aggregate .