Lines Matching defs:node
67 protected function setParent(?Node $node = null): void
69 $this->parent = $node;
70 $this->depth = $node === null ? 0 : $node->depth + 1;
74 * Inserts the $sibling node after $this
95 * Inserts the $sibling node before $this
196 * Detaches all child nodes of given node
208 * Replace all children of given node with collection of another
236 * Clone the current node and its children
238 * WARNING: This is a recursive function and should not be called on deeply-nested node trees!
256 public static function assertInstanceOf(Node $node): void
258 if (! $node instanceof static) {
259 throw new InvalidArgumentException(\sprintf('Incompatible node type: expected %s, got %s', static::class, \get_class($node)));