Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 480-484 (lines=5) @@
477
478
		$supported_formats = $response['formats'] = array();
479
480
		if ( isset( $supported[0] ) ) {
481
			foreach ( $supported[0] as $format ) {
482
				$supported_formats[ $format ] = $all_formats[ $format ];
483
			}
484
		}
485
486
		$response['formats'] = (object) $supported_formats;
487

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

@@ 98-102 (lines=5) @@
95
96
		$supported_formats = array();
97
98
		if ( isset( $supported[0] ) ) {
99
			foreach ( $supported[0] as $format ) {
100
				$supported_formats[ $format ] = $all_formats[ $format ];
101
			}
102
		}
103
104
		return $supported_formats;
105
	}