Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 1521-1535 (lines=15) @@
1518
				break;
1519
1520
			// Post by Email
1521
			case 'post-by-email':
1522
				$options = array(
1523
					'post_by_email_address' => array(
1524
						'description'       => esc_html__( 'Email Address', 'jetpack' ),
1525
						'type'              => 'string',
1526
						'default'           => '',
1527
						'enum'              => array(
1528
							'create'     => esc_html__( 'Create Post by Email address', 'jetpack' ),
1529
							'regenerate' => esc_html__( 'Regenerate Post by Email address', 'jetpack' ),
1530
							'delete'     => esc_html__( 'Delete Post by Email address', 'jetpack' ),
1531
						),
1532
						'validate_callback' => __CLASS__ . '::validate_list_item',
1533
					),
1534
				);
1535
				break;
1536
1537
			// Protect
1538
			case 'protect':
@@ 1645-1660 (lines=16) @@
1642
				break;
1643
1644
			// Site Icon
1645
			case 'site-icon':
1646
				$options = array(
1647
					'site_icon_id' => array(
1648
						'description'        => esc_html__( 'Site Icon ID', 'jetpack' ),
1649
						'type'               => 'integer',
1650
						'default'            => 0,
1651
						'validate_callback'  => __CLASS__ . '::validate_posint',
1652
					),
1653
					'site_icon_url' => array(
1654
						'description'        => esc_html__( 'Site Icon URL', 'jetpack' ),
1655
						'type'               => 'string',
1656
						'default'            => '',
1657
						'sanitize_callback'  => 'esc_url',
1658
					),
1659
				);
1660
				break;
1661
1662
			// Subscriptions
1663
			case 'subscriptions':