Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1621-1635 (lines=15) @@
1618
				break;
1619
1620
			// Post by Email
1621
			case 'post-by-email':
1622
				$options = array(
1623
					'post_by_email_address' => array(
1624
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1625
						'type'              => 'string',
1626
						'default'           => '',
1627
						'enum'              => array(
1628
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1629
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1630
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1631
						),
1632
						'validate_callback' => __CLASS__ . '::validate_list_item',
1633
					),
1634
				);
1635
				break;
1636
1637
			// Protect
1638
			case 'protect':
@@ 1745-1760 (lines=16) @@
1742
				break;
1743
1744
			// Site Icon
1745
			case 'site-icon':
1746
				$options = array(
1747
					'site_icon_id' => array(
1748
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1749
						'type'               => 'integer',
1750
						'default'            => 0,
1751
						'validate_callback'  => __CLASS__ . '::validate_posint',
1752
					),
1753
					'site_icon_url' => array(
1754
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1755
						'type'               => 'string',
1756
						'default'            => '',
1757
						'sanitize_callback'  => 'esc_url',
1758
					),
1759
				);
1760
				break;
1761
1762
			// Subscriptions
1763
			case 'subscriptions':