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

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