Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 430-432 (lines=3) @@
427
	public function get_url_trigger( $context, $sending_messenger, EE_Registration $registration ) {
428
		//validate context
429
		//valid context?
430
		if ( ! isset( $this->_contexts[ $context ] ) ) {
431
			throw new EE_Error(
432
				sprintf(
433
					__( 'The context %s is not a valid context for %s.', 'event_espresso' ),
434
					$context,
435
					get_class( $this )
@@ 486-488 (lines=3) @@
483
	 */
484
	public function get_data_for_context( $context, EE_Registration $registration, $id = 0 ) {
485
		//valid context?
486
		if ( ! isset( $this->_contexts[ $context ] ) ) {
487
			throw new EE_Error(
488
				sprintf(
489
					__( 'The context %s is not a valid context for %s.', 'event_espresso' ),
490
					$context,
491
					get_class( $this )

core/db_models/EEM_Base.model.php 1 location

@@ 4017-4019 (lines=3) @@
4014
					break;
4015
				}
4016
			}
4017
			if( ! isset( $this->_cache_foreign_key_to_fields[ $model_name ] ) ){
4018
				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)));
4019
			}
4020
		}
4021
		return $this->_cache_foreign_key_to_fields[ $model_name ];
4022
	}