Code Duplication    Length = 7-7 lines in 2 locations

src/PHPHtmlParser/Dom/AbstractNode.php 2 locations

@@ 329-335 (lines=7) @@
326
     * @return AbstractNode
327
     * @uses $this->getChild()
328
     */
329
    public function nextChild($id)
330
    {
331
        $child = $this->getChild($id);
332
        $next  = $this->children[$child->id()]['next'];
333
334
        return $this->getChild($next);
335
    }
336
337
    /**
338
     * Attempts to get the previous child.
@@ 344-350 (lines=7) @@
341
     * @return AbstractNode
342
     * @uses $this->getChild()
343
     */
344
    public function previousChild($id)
345
    {
346
        $child = $this->getchild($id);
347
        $next  = $this->children[$child->id()]['prev'];
348
349
        return $this->getChild($next);
350
    }
351
352
    /**
353
     * Checks if the given node id is a child of the