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

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