Code Duplication    Length = 3-4 lines in 2 locations

_inc/lib/class.jetpack-google-maps-api-key.php 1 location

@@ 51-54 (lines=4) @@
48
		$request = sprintf( '/sites/%d/google-maps-api', Jetpack_Options::get_option( 'id' ) );
49
		$response = Jetpack_Client::wpcom_json_api_request_as_blog( $request, '2', array(), null, 'wpcom' );
50
		// Bail if there was an error or malformed response
51
		if ( is_wp_error( $response ) || ! is_array( $response ) || ! isset( $response['body'] ) ) {
52
			$this->set_transient();
53
			return false;
54
		}
55
56
		$response = json_decode( $response['body'] );
57
		if ( isset( $response->code ) ) {

class.jetpack.php 1 location

@@ 1438-1440 (lines=3) @@
1435
		$response = Jetpack_Client::wpcom_json_api_request_as_blog( $request, '1.1' );
1436
1437
		// Bail if there was an error or malformed response
1438
		if ( is_wp_error( $response ) || ! is_array( $response ) || ! isset( $response['body'] ) ) {
1439
			return false;
1440
		}
1441
1442
		// Decode the results
1443
		$results = json_decode( $response['body'], true );