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

@@ 533-551 (lines=19) @@
530
     * @param ExemptTax[] $exemptTaxes
531
     * @return PricingOptionGroup[]
532
     */
533
    protected static function loadExemptTaxes($exemptTaxes)
534
    {
535
        $opt = [];
536
537
        if (!empty($exemptTaxes)) {
538
            $po = new PricingOptionGroup(PricingOptionKey::OPTION_EXEMPT_FROM_TAX);
539
540
            foreach ($exemptTaxes as $tax) {
541
                $po->taxInformation[] = new TaxInformation(
542
                    $tax->countryCode,
543
                    $tax->taxNature
544
                );
545
            }
546
547
            $opt[] = $po;
548
        }
549
550
        return $opt;
551
    }
552
553
    /**
554
     * @param \DateTime|null $pastDate