Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1535-1549 (lines=15) @@
1532
				break;
1533
1534
			// Post by Email
1535
			case 'post-by-email':
1536
				$options = array(
1537
					'post_by_email_address' => array(
1538
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1539
						'type'              => 'string',
1540
						'default'           => '',
1541
						'enum'              => array(
1542
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1543
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1544
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1545
						),
1546
						'validate_callback' => __CLASS__ . '::validate_list_item',
1547
					),
1548
				);
1549
				break;
1550
1551
			// Protect
1552
			case 'protect':
@@ 1659-1674 (lines=16) @@
1656
				break;
1657
1658
			// Site Icon
1659
			case 'site-icon':
1660
				$options = array(
1661
					'site_icon_id' => array(
1662
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1663
						'type'               => 'integer',
1664
						'default'            => 0,
1665
						'validate_callback'  => __CLASS__ . '::validate_posint',
1666
					),
1667
					'site_icon_url' => array(
1668
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1669
						'type'               => 'string',
1670
						'default'            => '',
1671
						'sanitize_callback'  => 'esc_url',
1672
					),
1673
				);
1674
				break;
1675
1676
			// Subscriptions
1677
			case 'subscriptions':