Code Duplication    Length = 15-15 lines in 2 locations

Bundle/CoreBundle/Route/RouteLoader.php 2 locations

@@ 95-109 (lines=15) @@
92
        $collection->add($routeName, $route);
93
    }
94
95
    protected function addShowPageRoute(RouteCollection &$collection)
96
    {
97
        // prepare a new route
98
        $pattern = '/{url}';
99
        $defaults = [
100
            '_controller' => 'VictoirePageBundle:Page:show',
101
        ];
102
        $requirements = [
103
            'url' => '^.*$',
104
        ];
105
        $route = new Route($pattern, $defaults, $requirements);
106
107
        // add the new route to the route collection:
108
        $collection->add('victoire_core_page_show', $route);
109
    }
110
111
    protected function addShowHomePageRoute(RouteCollection &$collection)
112
    {
@@ 111-125 (lines=15) @@
108
        $collection->add('victoire_core_page_show', $route);
109
    }
110
111
    protected function addShowHomePageRoute(RouteCollection &$collection)
112
    {
113
        // prepare a new route
114
        $pattern = '/';
115
        $defaults = [
116
            '_controller' => 'VictoirePageBundle:Page:show',
117
        ];
118
        $options = [
119
            'expose' => true,
120
        ];
121
        $route = new Route($pattern, $defaults, [], $options);
122
123
        // add the new route to the route collection:
124
        $collection->add('victoire_core_homepage_show', $route);
125
    }
126
127
    public function supports($resource, $type = null)
128
    {