Code Duplication    Length = 5-5 lines in 2 locations

admin_pages/registrations/Registrations_Admin_Page.core.php 2 locations

@@ 1849-1853 (lines=5) @@
1846
		$dtts = array();
1847
1848
		//if empty _REG_ID then get out because there's nothing to do
1849
		if ( empty( $this->_req_data['_REG_ID'] ) ) {
1850
			$msg = $trash ? __('In order to trash registrations you must select which ones you wish to trash by clicking the checkboxes.', 'event_espresso') : __('In order to restore registrations you must select which ones you wish to restore by clicking the checkboxes.', 'event_espresso');
1851
			EE_Error::add_error( $msg, __FILE__, __LINE__, __FUNCTION__ );
1852
			$this->_redirect_after_action(FALSE, '', '', array(), TRUE );
1853
		}
1854
1855
		//Checkboxes
1856
		if (!empty($this->_req_data['_REG_ID']) && is_array($this->_req_data['_REG_ID'])) {
@@ 2495-2499 (lines=5) @@
2492
	protected function _duplicate_attendee() {
2493
		$action = !empty( $this->_req_data['return'] ) ? $this->_req_data['return'] : 'default';
2494
		//verify we have necessary info
2495
		if ( empty($this->_req_data['_REG_ID'] )  ) {
2496
			EE_Error::add_error( __('Unable to create the contact for the registration because the required paramaters are not present (_REG_ID )', 'event_espresso'),  __FILE__, __LINE__, __FUNCTION__ );
2497
			$query_args = array( 'action' => $action );
2498
			$this->_redirect_after_action('', '', '', $query_args, TRUE);
2499
		}
2500
2501
		//okay necessary deets present... let's dupe the incoming attendee and attach to incoming registration.
2502
		$registration = EEM_Registration::instance()->get_one_by_ID( $this->_req_data['_REG_ID'] );