Code Duplication    Length = 5-5 lines in 3 locations

src/OroCRM/Bundle/MagentoBundle/Routing/OldOptionsRouteOptionsResolver.php 3 locations

@@ 24-28 (lines=5) @@
21
     */
22
    public function resolve(Route $route, RouteCollectionAccessor $routes)
23
    {
24
        if ($route->getPath() === '/magento/order/view/{id}') {
25
            $singleRoute = $routes->cloneRoute($route);
26
            $singleRoute->setPath('/magentoorder/view/{id}');
27
            $routes->append('orocrm_magentoorder_view', $singleRoute);
28
        }
29
30
        if (!in_array('GET', $route->getMethods(), true)) {
31
            return;
@@ 34-38 (lines=5) @@
31
            return;
32
        }
33
34
        if ($route->getPath() === '/api/rest/{version}/carts/{id}.{_format}') {
35
            $singleRoute = $routes->cloneRoute($route);
36
            $singleRoute->setPath('/api/rest/{version}/magentocarts/{id}.{_format}');
37
            $routes->append('oro_api_get_magentocarts', $singleRoute);
38
        }
39
40
        if ($route->getPath() === '/api/rest/{version}/orders/{id}.{_format}') {
41
            $singleRoute = $routes->cloneRoute($route);
@@ 40-44 (lines=5) @@
37
            $routes->append('oro_api_get_magentocarts', $singleRoute);
38
        }
39
40
        if ($route->getPath() === '/api/rest/{version}/orders/{id}.{_format}') {
41
            $singleRoute = $routes->cloneRoute($route);
42
            $singleRoute->setPath('/api/rest/{version}/magentoorders/{id}.{_format}');
43
            $routes->append('oro_api_get_magentoorders', $singleRoute);
44
        }
45
    }
46
}
47