Code Duplication    Length = 13-13 lines in 2 locations

Subscribers/ServiceContainer.php 1 location

@@ 77-89 (lines=13) @@
74
    /**
75
     * @return ProductStreamService
76
     */
77
    public function onProductStreamService()
78
    {
79
        /** @var ProductStreamAttributeRepository $streamAttrRepository */
80
        $streamAttrRepository = $this->manager->getRepository('Shopware\CustomModels\Connect\ProductStreamAttribute');
81
82
        return new ProductStreamService(
83
            new ProductStreamRepository($this->manager, $this->container->get('shopware_product_stream.repository')),
84
            $streamAttrRepository,
85
            new Config($this->manager),
86
            $this->container->get('shopware_search.product_search'),
87
            $this->container->get('shopware_storefront.context_service')
88
        );
89
    }
90
91
    /**
92
     * @return MenuService

Bootstrap/SubscriberRegistration.php 1 location

@@ 327-339 (lines=13) @@
324
    /**
325
     * @return ProductStreamService
326
     */
327
    private function createProductStreamService()
328
    {
329
        /** @var ProductStreamAttributeRepository $streamAttrRepository */
330
        $streamAttrRepository = $this->modelManager->getRepository('Shopware\CustomModels\Connect\ProductStreamAttribute');
331
332
        return new ProductStreamService(
333
            new ProductStreamRepository($this->modelManager, $this->container->get('shopware_product_stream.repository')),
334
            $streamAttrRepository,
335
            new Config($this->modelManager),
336
            $this->container->get('shopware_search.product_search'),
337
            $this->container->get('shopware_storefront.context_service')
338
        );
339
    }
340
}
341