Code Duplication    Length = 28-28 lines in 2 locations

src/Amadeus/Client/Struct/Ticket/RepricePnrWithBookingClass.php 1 location

@@ 464-491 (lines=28) @@
461
     * @param string|null $potOverride
462
     * @return PricingOption[]
463
     */
464
    protected function loadPointOverrides($posOverride, $potOverride)
465
    {
466
        $opt = [];
467
468
        if (!empty($posOverride)) {
469
            $po = new PricingOption(PricingOptionKey::OPTION_POINT_OF_SALE_OVERRIDE);
470
471
            $po->locationInformation = new LocationInformation(
472
                LocationInformation::TYPE_POINT_OF_SALE,
473
                $posOverride
474
            );
475
476
            $opt[] = $po;
477
        }
478
479
        if (!empty($potOverride)) {
480
            $po2 = new PricingOption(PricingOptionKey::OPTION_POINT_OF_TICKETING_OVERRIDE);
481
482
            $po2->locationInformation = new LocationInformation(
483
                LocationInformation::TYPE_POINT_OF_TICKETING,
484
                $potOverride
485
            );
486
487
            $opt[] = $po2;
488
        }
489
490
        return $opt;
491
    }
492
493
494
    /**

src/Amadeus/Client/Struct/Fare/PricePNRWithBookingClass13.php 1 location

@@ 447-474 (lines=28) @@
444
     * @param string|null $potOverride
445
     * @return PricingOptionGroup[]
446
     */
447
    protected static function loadPointOverrides($posOverride, $potOverride)
448
    {
449
        $opt = [];
450
451
        if (!empty($posOverride)) {
452
            $po = new PricingOptionGroup(PricingOptionKey::OPTION_POINT_OF_SALE_OVERRIDE);
453
454
            $po->locationInformation = new LocationInformation(
455
                LocationInformation::TYPE_POINT_OF_SALE,
456
                $posOverride
457
            );
458
459
            $opt[] = $po;
460
        }
461
462
        if (!empty($potOverride)) {
463
            $po2 = new PricingOptionGroup(PricingOptionKey::OPTION_POINT_OF_TICKETING_OVERRIDE);
464
465
            $po2->locationInformation = new LocationInformation(
466
                LocationInformation::TYPE_POINT_OF_TICKETING,
467
                $potOverride
468
            );
469
470
            $opt[] = $po2;
471
        }
472
473
        return $opt;
474
    }
475
476
    /**
477
     * @param string|null $pricingLogic