Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1387-1401 (lines=15) @@
1384
				break;
1385
1386
			// Post by Email
1387
			case 'post-by-email':
1388
				$options = array(
1389
					'post_by_email_address' => array(
1390
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1391
						'type'              => 'string',
1392
						'default'           => '',
1393
						'enum'              => array(
1394
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1395
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1396
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1397
						),
1398
						'validate_callback' => __CLASS__ . '::validate_list_item',
1399
					),
1400
				);
1401
				break;
1402
1403
			// Protect
1404
			case 'protect':
@@ 1511-1526 (lines=16) @@
1508
				break;
1509
1510
			// Site Icon
1511
			case 'site-icon':
1512
				$options = array(
1513
					'site_icon_id' => array(
1514
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1515
						'type'               => 'integer',
1516
						'default'            => 0,
1517
						'validate_callback'  => __CLASS__ . '::validate_posint',
1518
					),
1519
					'site_icon_url' => array(
1520
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1521
						'type'               => 'string',
1522
						'default'            => '',
1523
						'sanitize_callback'  => 'esc_url',
1524
					),
1525
				);
1526
				break;
1527
1528
			// Subscriptions
1529
			case 'subscriptions':