Code Duplication    Length = 5-5 lines in 4 locations

projects/plugins/jetpack/class-jetpack-recommendations-banner.php 4 locations

@@ 112-116 (lines=5) @@
109
110
		$tracking_answers = array();
111
112
		if ( isset( $_REQUEST['personal'] ) && is_string( $_REQUEST['personal'] ) ) {
113
			$value                        = 'true' === $_REQUEST['personal'] ? true : false;
114
			$data['site-type-personal']   = $value;
115
			$tracking_answers['personal'] = $value;
116
		}
117
118
		if ( isset( $_REQUEST['business'] ) && is_string( $_REQUEST['business'] ) ) {
119
			$value                        = 'true' === $_REQUEST['business'] ? true : false;
@@ 118-122 (lines=5) @@
115
			$tracking_answers['personal'] = $value;
116
		}
117
118
		if ( isset( $_REQUEST['business'] ) && is_string( $_REQUEST['business'] ) ) {
119
			$value                        = 'true' === $_REQUEST['business'] ? true : false;
120
			$data['site-type-business']   = $value;
121
			$tracking_answers['business'] = $value;
122
		}
123
124
		if ( isset( $_REQUEST['store'] ) && is_string( $_REQUEST['store'] ) ) {
125
			$value                     = 'true' === $_REQUEST['store'] ? true : false;
@@ 124-128 (lines=5) @@
121
			$tracking_answers['business'] = $value;
122
		}
123
124
		if ( isset( $_REQUEST['store'] ) && is_string( $_REQUEST['store'] ) ) {
125
			$value                     = 'true' === $_REQUEST['store'] ? true : false;
126
			$data['site-type-store']   = $value;
127
			$tracking_answers['store'] = $value;
128
		}
129
130
		if ( isset( $_REQUEST['other'] ) && is_string( $_REQUEST['other'] ) ) {
131
			$value                     = 'true' === $_REQUEST['other'] ? true : false;
@@ 130-134 (lines=5) @@
127
			$tracking_answers['store'] = $value;
128
		}
129
130
		if ( isset( $_REQUEST['other'] ) && is_string( $_REQUEST['other'] ) ) {
131
			$value                     = 'true' === $_REQUEST['other'] ? true : false;
132
			$data['site-type-other']   = $value;
133
			$tracking_answers['other'] = $value;
134
		}
135
136
		Jetpack_Recommendations::update_recommendations_data( $data );
137
		Jetpack_Options::update_option( 'recommendations_step', 'banner-completed' );