Code Duplication    Length = 3-3 lines in 3 locations

core/libraries/messages/EE_message_type.lib.php 2 locations

@@ 454-456 (lines=3) @@
451
452
		//validate context
453
		//valid context?
454
		if ( !isset( $this->_contexts[$context] ) ) {
455
			throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) );
456
		}
457
458
		//valid sending_messenger?
459
		$not_valid_msgr = FALSE;
@@ 493-495 (lines=3) @@
490
	 */
491
	public function get_data_for_context( $context, EE_Registration $registration, $id = 0 ) {
492
		//valid context?
493
		if ( !isset( $this->_contexts[$context] ) ) {
494
			throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) );
495
		}
496
497
		//get data and apply global and class specific filters on it.
498
		$data = apply_filters( 'FHEE__EE_message_type__get_data_for_context__data', $this->_get_data_for_context( $context, $registration, $id ), $this );

core/db_models/EEM_Base.model.php 1 location

@@ 3978-3980 (lines=3) @@
3975
					break;
3976
				}
3977
			}
3978
			if( ! isset( $this->_cache_foreign_key_to_fields[ $model_name ] ) ){
3979
				throw new EE_Error(sprintf(__("There is no foreign key field pointing to model %s on model %s",'event_espresso'),$model_name,get_class($this)));
3980
			}
3981
		}
3982
		return $this->_cache_foreign_key_to_fields[ $model_name ];
3983
	}