Code Duplication    Length = 16-16 lines in 2 locations

core/services/currency/CountryCurrencyDao.php 2 locations

@@ 78-93 (lines=16) @@
75
     * @throws EE_Error
76
     * @throws InvalidArgumentException
77
     */
78
    public function getCountryCurrencyByIsoCode($CNT_ISO = '')
79
    {
80
        $this->initializeCountryCurrencyData();
81
        if (! isset($this->country_currencies_by_iso_code[ $CNT_ISO ])) {
82
            throw new InvalidArgumentException(
83
                sprintf(
84
                    esc_html__(
85
                        'Valid country currency data could not be found for the "%1$s" country code;',
86
                        'event_espresso'
87
                    ),
88
                    $CNT_ISO
89
                )
90
            );
91
        }
92
        return $this->country_currencies_by_iso_code[ $CNT_ISO ];
93
    }
94
95
96
    /**
@@ 102-117 (lines=16) @@
99
     * @throws EE_Error
100
     * @throws InvalidArgumentException
101
     */
102
    public function getCountryCurrencyByCurrencyCode($code = '')
103
    {
104
        $this->initializeCountryCurrencyData();
105
        if (! isset($this->country_currencies_by_currency[ $code ])) {
106
            throw new InvalidArgumentException(
107
                sprintf(
108
                    esc_html__(
109
                        'A valid currency could not be found for the "%1$s" currency code;',
110
                        'event_espresso'
111
                    ),
112
                    $code
113
                )
114
            );
115
        }
116
        return $this->country_currencies_by_currency[ $code ];
117
    }
118
}
119