Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 388-391 (lines=4) @@
385
					return $send_messages;
386
				}
387
			}
388
		} else {
389
			EE_Error::add_error( sprintf( __('Message type: %s does not exist', 'event_espresso'), $type ), __FILE__, __FUNCTION__, __LINE__ );
390
			return false;
391
		}
392
		// add a success message
393
		if ( ! $error ) {
394
			EE_Error::add_success( sprintf( __( 'The %s message has been successfully sent.', 'event_espresso'), $installed_message_types[$type]->label['singular'] ), __FILE__, __FUNCTION__, __LINE__ );
@@ 438-441 (lines=4) @@
435
				return FALSE;
436
			}
437
438
		} else {
439
			EE_Error::add_error( sprintf( __('Message type: %s does not exist', 'event_espresso'), $type ), __FILE__, __FUNCTION__, __LINE__ );
440
			return FALSE;
441
		}
442
443
	}
444

modules/messages/EED_Messages.module.php 1 location

@@ 571-574 (lines=4) @@
568
		$regs_to_send = array();
569
570
		//first let's make sure we have the reg id (needed for resending!);
571
		if ( ! isset( $req_data['_REG_ID'] ) ) {
572
			EE_Error::add_error( __('Something went wrong because we\'re missing the registration ID', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
573
			return false;
574
		}
575
576
		//if $req_data['_REG_ID'] is an array then let's group the registrations by transaction and reg status
577
		// so we can only trigger messages per group.