Code Duplication    Length = 5-5 lines in 2 locations

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

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

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

@@ 577-581 (lines=5) @@
574
575
		$supported_formats = $response['formats'] = array();
576
577
		if ( isset( $supported[0] ) ) {
578
			foreach ( $supported[0] as $format ) {
579
				$supported_formats[ $format ] = $all_formats[ $format ];
580
			}
581
		}
582
583
		$response['formats'] = (object) $supported_formats;
584