Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 671-675 (lines=5) @@
668
669
		$supported_formats = $response['formats'] = array();
670
671
		if ( isset( $supported[0] ) ) {
672
			foreach ( $supported[0] as $format ) {
673
				$supported_formats[ $format ] = $all_formats[ $format ];
674
			}
675
		}
676
677
		$response['formats'] = (object) $supported_formats;
678

sal/class.json-api-site-jetpack-base.php 1 location

@@ 114-118 (lines=5) @@
111
112
		$supported_formats = array();
113
114
		if ( isset( $supported[0] ) ) {
115
			foreach ( $supported[0] as $format ) {
116
				$supported_formats[ $format ] = $all_formats[ $format ];
117
			}
118
		}
119
120
		return $supported_formats;
121
	}