Code Duplication    Length = 8-8 lines in 2 locations

src/AbstractElement.php 2 locations

@@ 10-17 (lines=8) @@
7
    /**
8
     * @return null|AbstractNode
9
     */
10
    public function previousSibling()
11
    {
12
        if (null === $parent = $this->parent) {
13
            return null;
14
        }
15
16
        return $this->getSibling($parent->getNodes(), -1);
17
    }
18
19
    /**
20
     * @return null|AbstractNode
@@ 22-29 (lines=8) @@
19
    /**
20
     * @return null|AbstractNode
21
     */
22
    public function nextSibling()
23
    {
24
        if (null === $parent = $this->parent) {
25
            return null;
26
        }
27
28
        return $this->getSibling($parent->getNodes(), 1);
29
    }
30
}
31