Code Duplication    Length = 13-13 lines in 2 locations

Subscribers/ServiceContainer.php 1 location

@@ 87-99 (lines=13) @@
84
    /**
85
     * @return ProductStreamService
86
     */
87
    public function onProductStreamService()
88
    {
89
        /** @var ProductStreamAttributeRepository $streamAttrRepository */
90
        $streamAttrRepository = $this->manager->getRepository(ProductStreamAttribute::class);
91
92
        return new ProductStreamService(
93
            new ProductStreamRepository($this->manager, $this->container->get('shopware_product_stream.repository')),
94
            $streamAttrRepository,
95
            new Config($this->manager),
96
            $this->container->get('shopware_search.product_search'),
97
            $this->container->get('shopware_storefront.context_service')
98
        );
99
    }
100
101
    /**
102
     * @return MenuService

Bootstrap/SubscriberRegistration.php 1 location

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