newNodeList([$this]); } /** * @return \DOMDocument */ public function document(): ?\DOMDocument { if ($this->isRemoved()) { return null; } return $this->ownerDocument; } /** * @param NodeList $nodeList * * @return NodeList|\DOMNode|null */ public function result(NodeList $nodeList) { if ($nodeList->count()) { return $nodeList->first(); } return null; } }