Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 219-227 (lines=9) @@
216
     * @param GatewayDataFormatterInterface $gateway_data_formatter
217
     * @throws InvalidEntityException if it's not set properly
218
     */
219
	public function set_gateway_data_formatter( GatewayDataFormatterInterface $gateway_data_formatter){
220
        if( ! $gateway_data_formatter instanceof GatewayDataFormatterInterface){
221
            throw new InvalidEntityException(
222
                is_object($gateway_data_formatter)
223
                    ? get_class($gateway_data_formatter)
224
                    : esc_html__('Not an object','event_espresso'),
225
                '\\EventEspresso\\core\\services\\payment_methods\\gateways\\GatewayDataFormatterInterface'
226
            );
227
        }
228
        $this->_gateway_data_formatter = $gateway_data_formatter;
229
    }
230
@@ 256-264 (lines=9) @@
253
     * @return FormatterInterface
254
     * @throws InvalidEntityException
255
     */
256
    public function set_unsupported_character_remover( FormatterInterface $formatter){
257
        if( ! $formatter instanceof FormatterInterface){
258
            throw new InvalidEntityException(
259
                is_object($formatter)
260
                    ? get_class($formatter)
261
                    : esc_html__('Not an object','event_espresso'),
262
                '\\EventEspresso\\core\\services\\formatters\\FormatterInterface'
263
            );
264
        }
265
       $this->_unsupported_character_remover = $formatter;
266
    }
267
    /**