Code Duplication    Length = 15-15 lines in 8 locations

core/helpers/EEH_Activation.helper.php 8 locations

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