Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 258-263 (lines=6) @@
255
			case 'guid' :
256
				$response[$key] = (string) $post->guid;
257
				break;
258
			case 'password' :
259
				$response[$key] = (string) $post->post_password;
260
				if ( 'edit' === $context ) {
261
					$response[$key] = htmlspecialchars_decode( (string) $response[$key], ENT_QUOTES );
262
				}
263
				break;
264
			case 'parent' : // (object|false)
265
				if ( $post->post_parent ) {
266
					$parent         = get_post( $post->post_parent );

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

@@ 241-246 (lines=6) @@
238
			case 'guid' :
239
				$response[$key] = (string) $post->guid;
240
				break;
241
			case 'password' :
242
				$response[$key] = (string) $post->post_password;
243
				if ( 'edit' === $context ) {
244
					$response[$key] = htmlspecialchars_decode( (string) $response[$key], ENT_QUOTES );
245
				}
246
				break;
247
			case 'parent' : // (object|false)
248
				if ( $post->post_parent ) {
249
					$parent         = get_post( $post->post_parent );