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;
@@ 490-494 (lines=5) @@
487
488
		$supported_formats = $response['formats'] = array();
489
490
		if ( isset( $supported[0] ) ) {
491
			foreach ( $supported[0] as $format ) {
492
				$supported_formats[ $format ] = $all_formats[ $format ];
493
			}
494
		}
495
496
		$response['formats'] = (object) $supported_formats;
497