Code Duplication    Length = 12-12 lines in 2 locations

lib/Event/PersistEvent.php 2 locations

@@ 69-80 (lines=12) @@
66
     *
67
     * @throws \RuntimeException
68
     */
69
    public function getNode()
70
    {
71
        if (!$this->node) {
72
            throw new \RuntimeException(sprintf(
73
                'Trying to retrieve node when no node has been set. An event ' .
74
                'listener should have set the node when persisting document "%s"',
75
                DocumentHelper::getDebugTitle($this->document)
76
            ));
77
        }
78
79
        return $this->node;
80
    }
81
82
    /**
83
     * @return NodeInterface
@@ 87-98 (lines=12) @@
84
     *
85
     * @throws \RuntimeException
86
     */
87
    public function getParentNode()
88
    {
89
        if (!$this->parentNode) {
90
            throw new \RuntimeException(sprintf(
91
                'Trying to retrieve parent node when no parent node has been set. An event ' .
92
                'listener should have set the node when persisting document "%s"',
93
                DocumentHelper::getDebugTitle($this->document)
94
            ));
95
        }
96
97
        return $this->parentNode;
98
    }
99
100
    /**
101
     * @return bool