Code Duplication    Length = 9-14 lines in 2 locations

src/Amadeus/Client/Struct/Fare/PricePNRWithBookingClass13.php 2 locations

@@ 326-334 (lines=9) @@
323
                /**
324
                 * @var FareFamily $item
325
                 */
326
                foreach ($fareFamily as $item) {
327
                    $po = new PricingOptionGroup(PricingOptionKey::OPTION_FARE_FAMILY);
328
                    $po->optionDetail = new OptionDetail([['FF' => $item->fareFamily]]);
329
                    $po->paxSegTstReference = new PaxSegTstReference($item->paxSegRefs);
330
331
                    $opt[] = $po;
332
                }
333
            } else {
334
                $po = new PricingOptionGroup(PricingOptionKey::OPTION_FARE_FAMILY);
335
                $po->optionDetail = new OptionDetail([['FF' => $fareFamily]]);
336
337
                $opt[] = $po;
@@ 656-669 (lines=14) @@
653
    {
654
        $opt = [];
655
        if (!empty($zapOffs)) {
656
            foreach ($zapOffs as $zapOff) {
657
                $po = new PricingOptionGroup(PricingOptionKey::OPTION_ZAP_OFF);
658
659
                $po->penDisInformation = new PenDisInformation(
660
                    PenDisInformation::QUAL_ZAPOFF_DISCOUNT,
661
                    [$zapOff]
662
                );
663
664
                if (!empty($zapOff->paxSegRefs)) {
665
                    $po->paxSegTstReference = new PaxSegTstReference($zapOff->paxSegRefs);
666
                }
667
668
                $opt[] = $po;
669
            }
670
        }
671
672
        return $opt;