Code Duplication    Length = 8-8 lines in 2 locations

src/Offer/ReadModel/JSONLD/CdbXMLItemBaseImporter.php 1 location

@@ 250-257 (lines=8) @@
247
            ]
248
        ];
249
250
        foreach ($tariffs as $tariff) {
251
            $jsonLD->priceInfo[] = [
252
                'category' => 'tariff',
253
                'name' => $tariff->getName()->serialize(),
254
                'price' => $tariff->getPrice()->toFloat(),
255
                'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(),
256
            ];
257
        }
258
    }
259
}
260

src/Offer/ReadModel/JSONLD/OfferLDProjector.php 1 location

@@ 770-777 (lines=8) @@
767
            'priceCurrency' => $basePrice->getCurrency()->getCode()->toNative(),
768
        ];
769
770
        foreach ($priceInfoUpdated->getPriceInfo()->getTariffs() as $tariff) {
771
            $offerLd->priceInfo[] = [
772
                'category' => 'tariff',
773
                'name' => $tariff->getName()->serialize(),
774
                'price' => $tariff->getPrice()->toFloat(),
775
                'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(),
776
            ];
777
        }
778
779
        return $document->withBody($offerLd);
780
    }