Code Duplication    Length = 5-5 lines in 3 locations

core/helpers/EEH_Template_Validator.helper.php 1 location

@@ 168-172 (lines=5) @@
165
	 */
166
	static function verify_argument_is_one_of($variable_to_test,$variable_name,$string_options){
167
		if(!WP_DEBUG)return;
168
		if(!in_array($variable_to_test,$string_options)){
169
			$msg[0]=__('Malconfigured template.','event_espresso');
170
			$msg[1]=__("Variable named '%s' was set to '%s'. It can only be one of '%s'",'event_espresso');
171
			throw new EE_Error(sprintf(implode("||",$msg),$variable_name,$variable_to_test, implode("', '",$string_options)));
172
		}
173
	}
174
175

core/admin/EE_Admin_Page.core.php 2 locations

@@ 594-598 (lines=5) @@
591
			$classname = str_replace('.class.php', '', $page);
592
593
			//autoloaders should take care of loading file
594
			if ( !class_exists( $classname ) ) {
595
				$error_msg[] = sprintf( __('Something went wrong with loading the %s admin hooks page.', 'event_espresso' ), $page);
596
				$error_msg[] = $error_msg[0] . "\r\n" . sprintf( __( 'There is no class in place for the %s admin hooks page.%sMake sure you have <strong>%s</strong> defined. If this is a non-EE-core admin page then you also must have an autoloader in place for your class', 'event_espresso'), $page, '<br />', $classname );
597
				throw new EE_Error( implode( '||', $error_msg ));
598
			}
599
600
			$a = new ReflectionClass($classname);
601
@@ 1181-1185 (lines=5) @@
1178
					}
1179
1180
					require_once $file_path;
1181
					if ( !class_exists( $tour ) ) {
1182
						$error_msg[] = sprintf( __('Something went wrong with loading the %s Help Tour Class.', 'event_espresso' ), $tour);
1183
						$error_msg[] = $error_msg[0] . "\r\n" . sprintf( __( 'There is no class in place for the %s help tour.%s Make sure you have <strong>%s</strong> defined in the "help_tour" array for the %s route of the % admin page.', 'event_espresso'), $tour, '<br />', $tour, $this->_req_action, get_class($this) );
1184
						throw new EE_Error( implode( '||', $error_msg ));
1185
					}
1186
					$a = new ReflectionClass($tour);
1187
					$tour_obj = $a->newInstance($this->_is_caf);
1188