Code Duplication    Length = 3-4 lines in 3 locations

core/libraries/messages/defaults/EE_Message_Template_Defaults.core.php 2 locations

@@ 205-207 (lines=3) @@
202
		$this->_message_type = $active_message_types[$this->_mt_name];
203
204
		//verify we have the messenger and message type objects
205
		if ( ! $this->_messenger instanceof EE_messenger ) {
206
			throw new EE_Error( sprintf( __('The _messenger property must be an instance of EE_messenger by this point.  It isn\'t. Something has gone wrong. Here is the value it holds:<br /> %s', 'event_espresso' ), print_r( $this->_messenger, TRUE ) ) );
207
		}
208
209
		if ( ! $this->_message_type instanceof EE_message_type ) {
210
			throw new EE_Error( sprintf( __('The _message_type property must be an instance of EE_message_type by this point.  It isn\'t. Something has gone wrong. Here is the value it holds:<br /> %s', 'event_espresso' ), print_r( $this->_message_type, TRUE ) ) );
@@ 209-211 (lines=3) @@
206
			throw new EE_Error( sprintf( __('The _messenger property must be an instance of EE_messenger by this point.  It isn\'t. Something has gone wrong. Here is the value it holds:<br /> %s', 'event_espresso' ), print_r( $this->_messenger, TRUE ) ) );
207
		}
208
209
		if ( ! $this->_message_type instanceof EE_message_type ) {
210
			throw new EE_Error( sprintf( __('The _message_type property must be an instance of EE_message_type by this point.  It isn\'t. Something has gone wrong. Here is the value it holds:<br /> %s', 'event_espresso' ), print_r( $this->_message_type, TRUE ) ) );
211
		}
212
213
214
		$this->_fields = $this->_messenger->get_template_fields();

core/libraries/payment_methods/EE_PMT_Base.lib.php 1 location

@@ 465-468 (lines=4) @@
462
	 */
463
	public function handle_ipn($req_data,$transaction){
464
		$transaction = EEM_Transaction::instance()->ensure_is_obj($transaction);
465
		if( ! $this->_gateway instanceof EE_Offsite_Gateway){
466
			throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r( $this->_gateway, TRUE )));
467
468
		}
469
		$payment = $this->_gateway->handle_payment_update( $req_data, $transaction );
470
		return $payment;
471
	}