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

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