Code Duplication    Length = 9-10 lines in 2 locations

src/Kunstmaan/NodeBundle/Helper/NodeMenu.php 2 locations

@@ 280-289 (lines=10) @@
277
    /**
278
     * @return NodeMenuItem|null
279
     */
280
    public function getCurrent()
281
    {
282
        $this->init();
283
        $breadCrumb = $this->getBreadCrumb();
284
        if (count($breadCrumb) > 0) {
285
            return $breadCrumb[count($breadCrumb) - 1];
286
        }
287
288
        return null;
289
    }
290
291
    /**
292
     * @param int $depth
@@ 296-304 (lines=9) @@
293
     *
294
     * @return NodeMenuItem|null
295
     */
296
    public function getActiveForDepth($depth)
297
    {
298
        $breadCrumb = $this->getBreadCrumb();
299
        if (count($breadCrumb) >= $depth) {
300
            return $breadCrumb[$depth - 1];
301
        }
302
303
        return null;
304
    }
305
306
    /**
307
     * @param Node $node