Code Duplication    Length = 2-3 lines in 3 locations

core/db_classes/EE_Base_Class.class.php 1 location

@@ 1250-1251 (lines=2) @@
1247
		$fn = (array) $field_name;
1248
		$args = array_merge( $fn, (array) $args );
1249
1250
		if ( !method_exists( $this, $callback ) )
1251
			throw new EE_Error(sprintf( __('The method named "%s" given as the callback param in "display_in_my_timezone" does not exist.  Please check your spelling', 'event_espresso'), $callback ) );
1252
		$args = (array) $args;
1253
		$return =  $prepend . call_user_func_array( array( $this, $callback ), $args ) . $append;
1254

core/libraries/messages/EE_message_type.lib.php 1 location

@@ 635-636 (lines=2) @@
632
		//process addressees for each context.  Child classes will have to have methods for each context defined to handle the processing of the data object within them
633
		foreach ( $this->_contexts as $context => $details ) {
634
			$xpctd_method = '_' . $context . '_addressees';
635
			if ( !method_exists( $this, $xpctd_method ) )
636
				throw new EE_Error( sprintf( __('The data for %1$s message type cannot be prepared because there is no set method for doing so.  The expected method name is "%2$s" please doublecheck the %1$s message type class and make sure that method is present', 'event_espresso'), $this->label['singular'], $xpctd_method) );
637
			 $this->_addressees[$context] = call_user_func( array( $this, $xpctd_method ) );
638
		}
639
		return true; //data was processed successfully.

core/db_models/EEM_Base.model.php 1 location

@@ 1832-1834 (lines=3) @@
1829
		}
1830
		/** @type WPDB $wpdb */
1831
		global $wpdb;
1832
		if( ! method_exists( $wpdb, $wpdb_method ) ){
1833
			throw new EE_Error( sprintf( __( 'There is no method named "%s" on Wordpress\' $wpdb object','event_espresso' ), $wpdb_method ) );
1834
		}
1835
		if( WP_DEBUG ){
1836
			$old_show_errors_value = $wpdb->show_errors;
1837
			$wpdb->show_errors( FALSE );