Code Duplication    Length = 8-8 lines in 2 locations

sync/class.jetpack-sync-reindex.php 2 locations

@@ 147-154 (lines=8) @@
144
		return (int) $results['results']['total'];
145
	}
146
147
	static function sync_reindex_trigger() {
148
		if ( Jetpack::current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) {
149
			echo json_encode( self::reindex_trigger() );
150
		} else {
151
			echo '{"status":"ERROR"}';
152
		}
153
		exit;
154
	}
155
156
	static function sync_reindex_status(){
157
		if ( Jetpack::current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) {
@@ 156-163 (lines=8) @@
153
		exit;
154
	}
155
156
	static function sync_reindex_status(){
157
		if ( Jetpack::current_user_is_connection_owner() && current_user_can( 'manage_options' ) ) {
158
			echo json_encode( self::reindex_status() );
159
		} else {
160
			echo '{"status":"ERROR"}';
161
		}
162
		exit;
163
	}
164
}