Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1573-1587 (lines=15) @@
1570
				break;
1571
1572
			// Post by Email
1573
			case 'post-by-email':
1574
				$options = array(
1575
					'post_by_email_address' => array(
1576
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1577
						'type'              => 'string',
1578
						'default'           => '',
1579
						'enum'              => array(
1580
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1581
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1582
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1583
						),
1584
						'validate_callback' => __CLASS__ . '::validate_list_item',
1585
					),
1586
				);
1587
				break;
1588
1589
			// Protect
1590
			case 'protect':
@@ 1697-1712 (lines=16) @@
1694
				break;
1695
1696
			// Site Icon
1697
			case 'site-icon':
1698
				$options = array(
1699
					'site_icon_id' => array(
1700
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1701
						'type'               => 'integer',
1702
						'default'            => 0,
1703
						'validate_callback'  => __CLASS__ . '::validate_posint',
1704
					),
1705
					'site_icon_url' => array(
1706
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1707
						'type'               => 'string',
1708
						'default'            => '',
1709
						'sanitize_callback'  => 'esc_url',
1710
					),
1711
				);
1712
				break;
1713
1714
			// Subscriptions
1715
			case 'subscriptions':