Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 264-271 (lines=8) @@
261
            ],
262
        ];
263
264
        foreach ($tariffs as $tariff) {
265
            $jsonLD->priceInfo[] = [
266
                'category' => 'tariff',
267
                'name' => $tariff->getName()->serialize(),
268
                'price' => $tariff->getPrice()->toFloat(),
269
                'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(),
270
            ];
271
        }
272
    }
273
}
274

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

@@ 781-788 (lines=8) @@
778
            'priceCurrency' => $basePrice->getCurrency()->getCode()->toNative(),
779
        ];
780
781
        foreach ($priceInfoUpdated->getPriceInfo()->getTariffs() as $tariff) {
782
            $offerLd->priceInfo[] = [
783
                'category' => 'tariff',
784
                'name' => $tariff->getName()->serialize(),
785
                'price' => $tariff->getPrice()->toFloat(),
786
                'priceCurrency' => $tariff->getCurrency()->getCode()->toNative(),
787
            ];
788
        }
789
790
        return $document->withBody($offerLd);
791
    }