Code Duplication    Length = 11-11 lines in 3 locations

src/Kunstmaan/NodeBundle/Helper/NodeMenuItem.php 1 location

@@ 191-201 (lines=11) @@
188
    /**
189
     * @return NodeMenuItem[]
190
     */
191
    public function getParents()
192
    {
193
        $parent = $this->getParent();
194
        $parents = array();
195
        while ($parent !== null) {
196
            $parents[] = $parent;
197
            $parent = $parent->getParent();
198
        }
199
200
        return array_reverse($parents);
201
    }
202
203
    /**
204
     * @param bool $includeHiddenFromNav Include hiddenFromNav nodes

src/Kunstmaan/MediaBundle/Entity/Folder.php 1 location

@@ 251-261 (lines=11) @@
248
    /**
249
     * @return Folder[]:
250
     */
251
    public function getParents()
252
    {
253
        $parent = $this->getParent();
254
        $parents = array();
255
        while ($parent !== null) {
256
            $parents[] = $parent;
257
            $parent = $parent->getParent();
258
        }
259
260
        return array_reverse($parents);
261
    }
262
263
    /**
264
     * Get parent

src/Kunstmaan/NodeBundle/Entity/Node.php 1 location

@@ 276-286 (lines=11) @@
273
    /**
274
     * @return Node[]
275
     */
276
    public function getParents()
277
    {
278
        $parent = $this->getParent();
279
        $parents = array();
280
        while ($parent !== null) {
281
            $parents[] = $parent;
282
            $parent = $parent->getParent();
283
        }
284
285
        return array_reverse($parents);
286
    }
287
288
    /**
289
     * @return bool