Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 533-537 (lines=5) @@
530
531
		$supported_formats = $response['formats'] = array();
532
533
		if ( isset( $supported[0] ) ) {
534
			foreach ( $supported[0] as $format ) {
535
				$supported_formats[ $format ] = $all_formats[ $format ];
536
			}
537
		}
538
539
		$response['formats'] = (object) $supported_formats;
540

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

@@ 109-113 (lines=5) @@
106
107
		$supported_formats = array();
108
109
		if ( isset( $supported[0] ) ) {
110
			foreach ( $supported[0] as $format ) {
111
				$supported_formats[ $format ] = $all_formats[ $format ];
112
			}
113
		}
114
115
		return $supported_formats;
116
	}