Code Duplication    Length = 15-15 lines in 8 locations

core/helpers/EEH_Activation.helper.php 8 locations

@@ 926-940 (lines=15) @@
923
				// add it
924
				switch ( $QST_system ) {
925
926
					case 'fname':
927
							$QST_values = array(
928
									'QST_display_text' => __( 'First Name', 'event_espresso' ),
929
									'QST_admin_label' => __( 'First Name - System Question', 'event_espresso' ),
930
									'QST_system' => 'fname',
931
									'QST_type' => 'TEXT',
932
									'QST_required' => 1,
933
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
934
									'QST_order' => 1,
935
									'QST_admin_only' => 0,
936
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
937
									'QST_wp_user' => self::get_default_creator_id(),
938
									'QST_deleted' => 0
939
								);
940
						break;
941
942
					case 'lname':
943
							$QST_values = array(
@@ 942-956 (lines=15) @@
939
								);
940
						break;
941
942
					case 'lname':
943
							$QST_values = array(
944
									'QST_display_text' => __( 'Last Name', 'event_espresso' ),
945
									'QST_admin_label' => __( 'Last Name - System Question', 'event_espresso' ),
946
									'QST_system' => 'lname',
947
									'QST_type' => 'TEXT',
948
									'QST_required' => 1,
949
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
950
									'QST_order' => 2,
951
									'QST_admin_only' => 0,
952
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
953
									'QST_wp_user' => self::get_default_creator_id(),
954
									'QST_deleted' => 0
955
								);
956
						break;
957
958
					case 'email':
959
							$QST_values = array(
@@ 958-972 (lines=15) @@
955
								);
956
						break;
957
958
					case 'email':
959
							$QST_values = array(
960
									'QST_display_text' => __( 'Email Address', 'event_espresso' ),
961
									'QST_admin_label' => __( 'Email Address - System Question', 'event_espresso' ),
962
									'QST_system' => 'email',
963
									'QST_type' => 'EMAIL',
964
									'QST_required' => 1,
965
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
966
									'QST_order' => 3,
967
									'QST_admin_only' => 0,
968
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
969
									'QST_wp_user' => self::get_default_creator_id(),
970
									'QST_deleted' => 0
971
								);
972
						break;
973
974
					case 'address':
975
							$QST_values = array(
@@ 974-988 (lines=15) @@
971
								);
972
						break;
973
974
					case 'address':
975
							$QST_values = array(
976
									'QST_display_text' => __( 'Address', 'event_espresso' ),
977
									'QST_admin_label' => __( 'Address - System Question', 'event_espresso' ),
978
									'QST_system' => 'address',
979
									'QST_type' => 'TEXT',
980
									'QST_required' => 0,
981
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
982
									'QST_order' => 4,
983
									'QST_admin_only' => 0,
984
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
985
									'QST_wp_user' => self::get_default_creator_id(),
986
									'QST_deleted' => 0
987
								);
988
						break;
989
990
					case 'address2':
991
							$QST_values = array(
@@ 990-1004 (lines=15) @@
987
								);
988
						break;
989
990
					case 'address2':
991
							$QST_values = array(
992
									'QST_display_text' => __( 'Address2', 'event_espresso' ),
993
									'QST_admin_label' => __( 'Address2 - System Question', 'event_espresso' ),
994
									'QST_system' => 'address2',
995
									'QST_type' => 'TEXT',
996
									'QST_required' => 0,
997
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
998
									'QST_order' => 5,
999
									'QST_admin_only' => 0,
1000
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
1001
									'QST_wp_user' => self::get_default_creator_id(),
1002
									'QST_deleted' => 0
1003
								);
1004
						break;
1005
1006
					case 'city':
1007
							$QST_values = array(
@@ 1006-1020 (lines=15) @@
1003
								);
1004
						break;
1005
1006
					case 'city':
1007
							$QST_values = array(
1008
									'QST_display_text' => __( 'City', 'event_espresso' ),
1009
									'QST_admin_label' => __( 'City - System Question', 'event_espresso' ),
1010
									'QST_system' => 'city',
1011
									'QST_type' => 'TEXT',
1012
									'QST_required' => 0,
1013
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
1014
									'QST_order' => 6,
1015
									'QST_admin_only' => 0,
1016
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
1017
									'QST_wp_user' => self::get_default_creator_id(),
1018
									'QST_deleted' => 0
1019
								);
1020
						break;
1021
					case 'country' :
1022
						$QST_values = array(
1023
							'QST_display_text'  => __( 'Country', 'event_espresso' ),
@@ 1051-1065 (lines=15) @@
1048
						);
1049
						break;
1050
1051
					case 'zip':
1052
							$QST_values = array(
1053
									'QST_display_text' => __( 'Zip/Postal Code', 'event_espresso' ),
1054
									'QST_admin_label' => __( 'Zip/Postal Code - System Question', 'event_espresso' ),
1055
									'QST_system' => 'zip',
1056
									'QST_type' => 'TEXT',
1057
									'QST_required' => 0,
1058
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
1059
									'QST_order' => 9,
1060
									'QST_admin_only' => 0,
1061
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
1062
									'QST_wp_user' => self::get_default_creator_id(),
1063
									'QST_deleted' => 0
1064
								);
1065
						break;
1066
1067
					case 'phone':
1068
							$QST_values = array(
@@ 1067-1081 (lines=15) @@
1064
								);
1065
						break;
1066
1067
					case 'phone':
1068
							$QST_values = array(
1069
									'QST_display_text' => __( 'Phone Number', 'event_espresso' ),
1070
									'QST_admin_label' => __( 'Phone Number - System Question', 'event_espresso' ),
1071
									'QST_system' => 'phone',
1072
									'QST_type' => 'TEXT',
1073
									'QST_required' => 0,
1074
									'QST_required_text' => __( 'This field is required', 'event_espresso' ),
1075
									'QST_order' => 10,
1076
									'QST_admin_only' => 0,
1077
									'QST_max' => EEM_Question::instance()->absolute_max_for_system_question( $QST_system ),
1078
									'QST_wp_user' => self::get_default_creator_id(),
1079
									'QST_deleted' => 0
1080
								);
1081
						break;
1082
1083
				}
1084
				if ( ! empty( $QST_values )) {