Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 431-433 (lines=3) @@
428
429
		//validate context
430
		//valid context?
431
		if ( !isset( $this->_contexts[$context] ) ) {
432
			throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) );
433
		}
434
435
		//valid sending_messenger?
436
		$not_valid_msgr = FALSE;
@@ 471-473 (lines=3) @@
468
	 */
469
	public function get_data_for_context( $context, EE_Registration $registration, $id = 0 ) {
470
		//valid context?
471
		if ( !isset( $this->_contexts[$context] ) ) {
472
			throw new EE_Error( sprintf( __('The context %s is not a valid context for %s.', 'event_espresso'), $context, get_class( $this ) ) );
473
		}
474
475
		//get data and apply global and class specific filters on it.
476
		$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

@@ 3654-3656 (lines=3) @@
3651
					}
3652
				}
3653
			}
3654
			if( ! isset( $this->_cache_foreign_key_to_fields[ $model_name ] ) ){
3655
				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)));
3656
			}
3657
		}
3658
		return $this->_cache_foreign_key_to_fields[ $model_name ];
3659
	}