Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1604-1618 (lines=15) @@
1601
				break;
1602
1603
			// Post by Email
1604
			case 'post-by-email':
1605
				$options = array(
1606
					'post_by_email_address' => array(
1607
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1608
						'type'              => 'string',
1609
						'default'           => '',
1610
						'enum'              => array(
1611
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1612
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1613
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1614
						),
1615
						'validate_callback' => __CLASS__ . '::validate_list_item',
1616
					),
1617
				);
1618
				break;
1619
1620
			// Protect
1621
			case 'protect':
@@ 1728-1743 (lines=16) @@
1725
				break;
1726
1727
			// Site Icon
1728
			case 'site-icon':
1729
				$options = array(
1730
					'site_icon_id' => array(
1731
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1732
						'type'               => 'integer',
1733
						'default'            => 0,
1734
						'validate_callback'  => __CLASS__ . '::validate_posint',
1735
					),
1736
					'site_icon_url' => array(
1737
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1738
						'type'               => 'string',
1739
						'default'            => '',
1740
						'sanitize_callback'  => 'esc_url',
1741
					),
1742
				);
1743
				break;
1744
1745
			// Subscriptions
1746
			case 'subscriptions':