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

@@ 4744-4746 (lines=3) @@
4741
                    break;
4742
                }
4743
            }
4744
            if (! isset($this->_cache_foreign_key_to_fields[$model_name])) {
4745
                throw new EE_Error(sprintf(__("There is no foreign key field pointing to model %s on model %s",
4746
                    'event_espresso'), $model_name, get_class($this)));
4747
            }
4748
        }
4749
        return $this->_cache_foreign_key_to_fields[$model_name];