Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1597-1611 (lines=15) @@
1594
				break;
1595
1596
			// Post by Email
1597
			case 'post-by-email':
1598
				$options = array(
1599
					'post_by_email_address' => array(
1600
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1601
						'type'              => 'string',
1602
						'default'           => '',
1603
						'enum'              => array(
1604
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1605
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1606
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1607
						),
1608
						'validate_callback' => __CLASS__ . '::validate_list_item',
1609
					),
1610
				);
1611
				break;
1612
1613
			// Protect
1614
			case 'protect':
@@ 1721-1736 (lines=16) @@
1718
				break;
1719
1720
			// Site Icon
1721
			case 'site-icon':
1722
				$options = array(
1723
					'site_icon_id' => array(
1724
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1725
						'type'               => 'integer',
1726
						'default'            => 0,
1727
						'validate_callback'  => __CLASS__ . '::validate_posint',
1728
					),
1729
					'site_icon_url' => array(
1730
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1731
						'type'               => 'string',
1732
						'default'            => '',
1733
						'sanitize_callback'  => 'esc_url',
1734
					),
1735
				);
1736
				break;
1737
1738
			// Subscriptions
1739
			case 'subscriptions':