Code Duplication    Length = 19-19 lines in 2 locations

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

@@ 393-411 (lines=19) @@
390
     * @param ExemptTax[] $exemptTaxes
391
     * @return PricingOption[]
392
     */
393
    protected function loadExemptTaxes($exemptTaxes)
394
    {
395
        $opt = [];
396
397
        if (!empty($exemptTaxes)) {
398
            $po = new PricingOption(PricingOptionKey::OPTION_EXEMPT_TAXES);
399
400
            foreach ($exemptTaxes as $tax) {
401
                $po->taxInformation[] = new TaxInformation(
402
                    $tax->countryCode,
403
                    $tax->taxNature
404
                );
405
            }
406
407
            $opt[] = $po;
408
        }
409
410
        return $opt;
411
    }
412
413
    /**
414
     * @param string|null $currency

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

@@ 565-583 (lines=19) @@
562
     * @param ExemptTax[] $exemptTaxes
563
     * @return PricingOptionGroup[]
564
     */
565
    protected static function loadExemptTaxes($exemptTaxes)
566
    {
567
        $opt = [];
568
569
        if (!empty($exemptTaxes)) {
570
            $po = new PricingOptionGroup(PricingOptionKey::OPTION_EXEMPT_FROM_TAX);
571
572
            foreach ($exemptTaxes as $tax) {
573
                $po->taxInformation[] = new TaxInformation(
574
                    $tax->countryCode,
575
                    $tax->taxNature
576
                );
577
            }
578
579
            $opt[] = $po;
580
        }
581
582
        return $opt;
583
    }
584
585
    /**
586
     * @param \DateTime|null $pastDate