Code Duplication    Length = 9-9 lines in 2 locations

core/libraries/payment_methods/EE_Gateway.lib.php 2 locations

@@ 272-280 (lines=9) @@
269
     * @return GatewayDataFormatterInterface
270
     * @throws InvalidEntityException if it's not set properly
271
     */
272
    protected function _get_gateway_formatter()
273
    {
274
        if (! $this->_gateway_data_formatter instanceof GatewayDataFormatterInterface) {
275
            throw new InvalidEntityException(
276
                is_object($this->_gateway_data_formatter)
277
                    ? get_class($this->_gateway_data_formatter)
278
                    : esc_html__('Not an object', 'event_espresso'),
279
                '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface'
280
            );
281
        }
282
        return $this->_gateway_data_formatter;
283
    }
@@ 312-320 (lines=9) @@
309
     * @return FormatterInterface
310
     * @throws InvalidEntityException
311
     */
312
    protected function _get_unsupported_character_remover()
313
    {
314
        if (! $this->_unsupported_character_remover instanceof FormatterInterface) {
315
            throw new InvalidEntityException(
316
                is_object($this->_unsupported_character_remover)
317
                    ? get_class($this->_unsupported_character_remover)
318
                    : esc_html__('Not an object', 'event_espresso'),
319
                '\\EventEspresso\\core\\services\\formatters\\FormatterInterface'
320
            );
321
        }
322
        return $this->_unsupported_character_remover;
323
    }