Code Duplication    Length = 13-13 lines in 2 locations

Bootstrap/SubscriberRegistration.php 1 location

@@ 288-300 (lines=13) @@
285
    /**
286
     * @return ProductStreamService
287
     */
288
    private function createProductStreamService()
289
    {
290
        /** @var ProductStreamAttributeRepository $streamAttrRepository */
291
        $streamAttrRepository = $this->modelManager->getRepository('Shopware\CustomModels\Connect\ProductStreamAttribute');
292
293
        return new ProductStreamService(
294
            new ProductStreamRepository($this->modelManager, $this->container->get('shopware_product_stream.repository')),
295
            $streamAttrRepository,
296
            $this->config,
297
            $this->container->get('shopware_search.product_search'),
298
            $this->container->get('shopware_storefront.context_service')
299
        );
300
    }
301
302
    /**
303
     * @return array

Subscribers/ServiceContainer.php 1 location

@@ 96-108 (lines=13) @@
93
    /**
94
     * @return ProductStreamService
95
     */
96
    public function onProductStreamService()
97
    {
98
        /** @var ProductStreamAttributeRepository $streamAttrRepository */
99
        $streamAttrRepository = $this->manager->getRepository(ProductStreamAttribute::class);
100
101
        return new ProductStreamService(
102
            new ProductStreamRepository($this->manager, $this->container->get('shopware_product_stream.repository')),
103
            $streamAttrRepository,
104
            $this->config,
105
            $this->container->get('shopware_search.product_search'),
106
            $this->container->get('shopware_storefront.context_service')
107
        );
108
    }
109
110
    /**
111
     * @return MenuService