Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1500-1514 (lines=15) @@
1497
				break;
1498
1499
			// Post by Email
1500
			case 'post-by-email':
1501
				$options = array(
1502
					'post_by_email_address' => array(
1503
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1504
						'type'              => 'string',
1505
						'default'           => '',
1506
						'enum'              => array(
1507
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1508
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1509
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1510
						),
1511
						'validate_callback' => __CLASS__ . '::validate_list_item',
1512
					),
1513
				);
1514
				break;
1515
1516
			// Protect
1517
			case 'protect':
@@ 1624-1639 (lines=16) @@
1621
				break;
1622
1623
			// Site Icon
1624
			case 'site-icon':
1625
				$options = array(
1626
					'site_icon_id' => array(
1627
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1628
						'type'               => 'integer',
1629
						'default'            => 0,
1630
						'validate_callback'  => __CLASS__ . '::validate_posint',
1631
					),
1632
					'site_icon_url' => array(
1633
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1634
						'type'               => 'string',
1635
						'default'            => '',
1636
						'sanitize_callback'  => 'esc_url',
1637
					),
1638
				);
1639
				break;
1640
1641
			// Subscriptions
1642
			case 'subscriptions':