Baum\SetValidator::validateRoots PHP Method

validateRoots() protected method

For each root of the whole nested set tree structure, checks that their lft and rgt bounds are properly set.
protected validateRoots ( ) : boolean
return boolean
    protected function validateRoots()
    {
        $roots = forward_static_call([get_class($this->node), 'roots'])->get();
        // If a scope is defined in the model we should check that the roots are
        // valid *for each* value in the scope columns.
        if ($this->node->isScoped()) {
            return $this->validateRootsByScope($roots);
        }
        return $this->isEachRootValid($roots);
    }