Code Duplication    Length = 16-16 lines in 2 locations

core/services/currency/CountryCurrencyDao.php 2 locations

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