Code Duplication    Length = 4-5 lines in 2 locations

core/EE_Module_Request_Router.core.php 1 location

@@ 159-163 (lines=5) @@
156
		// grab method
157
		$method = $module_method[1];
158
		// verify that class exists
159
		if ( ! class_exists( $module_name )) {
160
			$msg = sprintf( __( 'The requested %s class could not be found.', 'event_espresso' ), $module_name );
161
			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
162
			return FALSE;
163
		}
164
		// verify that method exists
165
		if ( ! method_exists( $module_name, $method )) {
166
			$msg = sprintf( __( 'The class method %s for the %s route is in invalid.', 'event_espresso' ), $method, $current_route );

core/admin/EE_Admin_Page.core.php 1 location

@@ 1108-1111 (lines=4) @@
1105
					$file_path = !is_readable($file_path) ? EE_ADMIN_PAGES . basename($this->_get_dir()) . '/help_tabs/' . $cfg['filename'] . '.help_tab.php' : $file_path;
1106
1107
					//if file is STILL not readable then let's do a EE_Error so its more graceful than a fatal error.
1108
					if ( !is_readable($file_path) && !isset($cfg['callback']) ) {
1109
						EE_Error::add_error( sprintf( __('The filename given for the help tab %s is not a valid file and there is no other configuration for the tab content.  Please check that the string you set for the help tab on this route (%s) is the correct spelling.  The file should be in %s', 'event_espresso'), $tab_id, key($config), $file_path ), __FILE__, __FUNCTION__, __LINE__ );
1110
						return;
1111
					}
1112
					$template_args['admin_page_obj'] = $this;
1113
					$content = EEH_Template::display_template($file_path, $template_args, true);
1114
				} else {