Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 331-351 (lines=21) @@
328
     * @param PaxSegRef[] $obFeeRefs
329
     * @return PricingOptionGroup[]
330
     */
331
    protected static function loadObFees($obFees, $obFeeRefs)
332
    {
333
        $opt = [];
334
335
        if (!empty($obFees)) {
336
            $po = new PricingOptionGroup(PricingOptionKey::OPTION_OB_FEES);
337
338
            $po->penDisInformation = new PenDisInformation(
339
                PenDisInformation::QUAL_OB_FEES,
340
                $obFees
341
            );
342
343
            if (!empty($obFeeRefs)) {
344
                $po->paxSegTstReference = new PaxSegTstReference(null, $obFeeRefs);
345
            }
346
347
            $opt[] = $po;
348
        }
349
350
        return $opt;
351
    }
352
353
    /**
354
     * @param string[] $paxDiscount
@@ 358-378 (lines=21) @@
355
     * @param PaxSegRef[] $paxDiscountCodeRefs
356
     * @return PricingOptionGroup[]
357
     */
358
    protected static function loadPaxDiscount($paxDiscount, $paxDiscountCodeRefs)
359
    {
360
        $opt = [];
361
362
        if (!empty($paxDiscount)) {
363
            $po = new PricingOptionGroup(PricingOptionKey::OPTION_PASSENGER_DISCOUNT_PTC);
364
365
            $po->penDisInformation = new PenDisInformation(
366
                PenDisInformation::QUAL_DISCOUNT,
367
                $paxDiscount
368
            );
369
370
            if (!empty($paxDiscountCodeRefs)) {
371
                $po->paxSegTstReference = new PaxSegTstReference(null, $paxDiscountCodeRefs);
372
            }
373
374
            $opt[] = $po;
375
        }
376
377
        return $opt;
378
    }
379
380
    /**
381
     * @param string|null $posOverride