Code Duplication    Length = 5-5 lines in 2 locations

json-endpoints/class.wpcom-json-api-get-site-endpoint.php 2 locations

@@ 230-234 (lines=5) @@
227
228
				$supported_formats = array();
229
230
				if ( isset( $supported[0] ) ) {
231
					foreach ( $supported[0] as $format ) {
232
						$supported_formats[ $format ] = $all_formats[ $format ];
233
					}
234
				}
235
236
				// determine if sharing buttons should be visible by default
237
				$default_sharing_status = false;
@@ 501-505 (lines=5) @@
498
499
		$supported_formats = $response['formats'] = array();
500
501
		if ( isset( $supported[0] ) ) {
502
			foreach ( $supported[0] as $format ) {
503
				$supported_formats[ $format ] = $all_formats[ $format ];
504
			}
505
		}
506
507
		$response['formats'] = (object) $supported_formats;
508