Code Duplication    Length = 15-16 lines in 2 locations

_inc/lib/class.core-rest-api-endpoints.php 2 locations

@@ 1126-1140 (lines=15) @@
1123
				break;
1124
1125
			// Post by Email
1126
			case 'post-by-email':
1127
				$options = array(
1128
					'post_by_email_address' => array(
1129
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1130
						'type'              => 'string',
1131
						'default'           => '',
1132
						'enum'              => array(
1133
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1134
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1135
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1136
						),
1137
						'validate_callback' => __CLASS__ . '::validate_list_item',
1138
					),
1139
				);
1140
				break;
1141
1142
			// Protect
1143
			case 'protect':
@@ 1250-1265 (lines=16) @@
1247
				break;
1248
1249
			// Site Icon
1250
			case 'site-icon':
1251
				$options = array(
1252
					'site_icon_id' => array(
1253
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1254
						'type'               => 'integer',
1255
						'default'            => 0,
1256
						'validate_callback'  => __CLASS__ . '::validate_posint',
1257
					),
1258
					'site_icon_url' => array(
1259
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1260
						'type'               => 'string',
1261
						'default'            => '',
1262
						'sanitize_callback'  => 'esc_url',
1263
					),
1264
				);
1265
				break;
1266
1267
			// Subscriptions
1268
			case 'subscriptions':