public function remove() { /** @var \DOMNode|Implementation $this */ if ($this->parentNode instanceof \DOMNode) { $this->parentNode->removeChild($this); } return $this; }