public function removeChild(string $childId, bool $setParent = true): NodeInterface
    {
        if ($this->hasChild($childId)) {
            $child = $this->getChild($childId);

            if ($setParent) {
                $child->removeParent($this->getId(), false);
            }

            unset($this->_children[$childId]);

            $this->notifySubscribers(
                self::EVENT_REMOVE_CHILD,
                ['parent' => $this, 'child' => $child]
            );

            /** @var NodeInterface $parent */
            foreach ($this->getAllParents() as $parent) {
                $child->removeSubscriber($parent->getId());
            }
        }

        return $this;
    }