Code Duplication    Length = 7-7 lines in 2 locations

core/admin/EE_Admin_Page.core.php 2 locations

@@ 782-788 (lines=7) @@
779
		if ( array_key_exists( $this->_req_action, $this->_page_routes )) {
780
			$this->_route = $this->_page_routes[ $this->_req_action ];
781
			$this->_route_config = isset($this->_page_config[$this->_req_action]) ? $this->_page_config[$this->_req_action] : array();
782
		} else {
783
			// user error msg
784
			$error_msg =  sprintf( __( 'The requested page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title );
785
			// developer error msg
786
			$error_msg .=  '||' . $error_msg . sprintf( __( ' Create a key in the "_page_routes" array named "%s" and set its value to the appropriate method.', 'event_espresso' ), $this->_req_action );
787
			throw new EE_Error( $error_msg );
788
		}
789
790
		// and that a default route exists
791
		if ( ! array_key_exists( 'default', $this->_page_routes )) {
@@ 825-831 (lines=7) @@
822
	protected function _verify_route( $route ) {
823
		if ( array_key_exists( $this->_req_action, $this->_page_routes )) {
824
			return true;
825
		} else {
826
			// user error msg
827
			$error_msg =  sprintf( __( 'The given page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title );
828
			// developer error msg
829
			$error_msg .=  '||' . $error_msg . sprintf( __( ' Check the route you are using in your method (%s) and make sure it matches a route set in your "_page_routes" array property', 'event_espresso' ), $route );
830
			throw new EE_Error( $error_msg );
831
		}
832
	}
833
834