Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 220-224 (lines=5) @@
217
218
				$supported_formats = array();
219
220
				if ( isset( $supported[0] ) ) {
221
					foreach ( $supported[0] as $format ) {
222
						$supported_formats[ $format ] = $all_formats[ $format ];
223
					}
224
				}
225
226
				// determine if sharing buttons should be visible by default
227
				$default_sharing_status = false;
@@ 488-492 (lines=5) @@
485
486
		$supported_formats = $response['formats'] = array();
487
488
		if ( isset( $supported[0] ) ) {
489
			foreach ( $supported[0] as $format ) {
490
				$supported_formats[ $format ] = $all_formats[ $format ];
491
			}
492
		}
493
494
		$response['formats'] = (object) $supported_formats;
495