Code Duplication    Length = 9-11 lines in 2 locations

src/Kunstmaan/MenuBundle/Service/RenderService.php 2 locations

@@ 39-49 (lines=11) @@
36
        }
37
38
        $hasActiveChild = false;
39
        if ($node['__children']) {
40
            foreach ($node['__children'] as $childNode) {
41
                if ($childNode['type'] == MenuItem::TYPE_PAGE_LINK) {
42
                    $childUrl = $this->router->generate('_slug', array('url' => $childNode['nodeTranslation']['url']));
43
                    if ($this->router->getContext()->getPathInfo() == $childUrl) {
44
                        $hasActiveChild = true;
45
46
                        break;
47
                    }
48
                }
49
            }
50
        }
51
52
        $active = false;
@@ 53-61 (lines=9) @@
50
        }
51
52
        $active = false;
53
        if ($node['type'] == MenuItem::TYPE_PAGE_LINK) {
54
            $url = $this->router->generate('_slug', array('url' => $node['nodeTranslation']['url']));
55
56
            if ($this->router->getContext()->getPathInfo() == $url) {
57
                $active = true;
58
            }
59
        } else {
60
            $url = $node['url'];
61
        }
62
63
        if ($node['type'] == MenuItem::TYPE_PAGE_LINK) {
64
            if ($node['title']) {