Code Duplication    Length = 5-5 lines in 2 locations

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
	}

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

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