Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1512-1526 (lines=15) @@
1509
				break;
1510
1511
			// Post by Email
1512
			case 'post-by-email':
1513
				$options = array(
1514
					'post_by_email_address' => array(
1515
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1516
						'type'              => 'string',
1517
						'default'           => '',
1518
						'enum'              => array(
1519
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1520
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1521
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1522
						),
1523
						'validate_callback' => __CLASS__ . '::validate_list_item',
1524
					),
1525
				);
1526
				break;
1527
1528
			// Protect
1529
			case 'protect':
@@ 1636-1651 (lines=16) @@
1633
				break;
1634
1635
			// Site Icon
1636
			case 'site-icon':
1637
				$options = array(
1638
					'site_icon_id' => array(
1639
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1640
						'type'               => 'integer',
1641
						'default'            => 0,
1642
						'validate_callback'  => __CLASS__ . '::validate_posint',
1643
					),
1644
					'site_icon_url' => array(
1645
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1646
						'type'               => 'string',
1647
						'default'            => '',
1648
						'sanitize_callback'  => 'esc_url',
1649
					),
1650
				);
1651
				break;
1652
1653
			// Subscriptions
1654
			case 'subscriptions':