Code Duplication    Length = 11-11 lines in 2 locations

json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location

@@ 301-311 (lines=11) @@
298
				}
299
				$response[$key] = (bool) $post_likes_enabled;
300
				break;
301
			case 'sharing_enabled' :
302
				$show = true;
303
				/** This filter is documented in modules/sharedaddy/sharing-service.php */
304
				$show = apply_filters( 'sharing_show', $show, $post );
305
306
				$switched_status = get_post_meta( $post->ID, 'sharing_disabled', false );
307
308
				if ( !empty( $switched_status ) )
309
					$show = false;
310
				$response[$key] = (bool) $show;
311
				break;
312
			case 'comment_count' :
313
				$response[$key] = (int) $post->comment_count;
314
				break;

json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php 1 location

@@ 288-298 (lines=11) @@
285
				}
286
				$response[$key] = (bool) $post_likes_enabled;
287
				break;
288
			case 'sharing_enabled' :
289
				$show = true;
290
				/** This filter is documented in modules/sharedaddy/sharing-service.php */
291
				$show = apply_filters( 'sharing_show', $show, $post );
292
293
				$switched_status = get_post_meta( $post->ID, 'sharing_disabled', false );
294
295
				if ( !empty( $switched_status ) )
296
					$show = false;
297
				$response[$key] = (bool) $show;
298
				break;
299
			case 'like_count' :
300
				$response[$key] = (int) $this->api->post_like_count( $blog_id, $post->ID );
301
				break;