Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 105-109 (lines=5) @@
102
103
		$supported_formats = array();
104
105
		if ( isset( $supported[0] ) ) {
106
			foreach ( $supported[0] as $format ) {
107
				$supported_formats[ $format ] = $all_formats[ $format ];
108
			}
109
		}
110
111
		return $supported_formats;
112
	}

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