Code Duplication    Length = 4-4 lines in 3 locations

class.jetpack.php 3 locations

@@ 5217-5220 (lines=4) @@
5214
			$user_id = (int) $user_id;
5215
5216
			$user = new WP_User( $user_id );
5217
			if ( ! $user || ! $user->exists() ) {
5218
				$this->xmlrpc_verification = new WP_Error( 'unknown_user', sprintf( 'User %d does not exist', $user_id ), compact( 'signature_details' ) );
5219
				return $this->xmlrpc_verification;
5220
			}
5221
		}
5222
5223
		$token = Jetpack_Data::get_access_token( $user_id, $token_key );
@@ 5224-5227 (lines=4) @@
5221
		}
5222
5223
		$token = Jetpack_Data::get_access_token( $user_id, $token_key );
5224
		if ( ! $token ) {
5225
			$this->xmlrpc_verification = new WP_Error( 'unknown_token', sprintf( 'Token %s:%s:%d does not exist', $token_key, $version, $user_id ), compact( 'signature_details' ) );
5226
			return $this->xmlrpc_verification;
5227
		}
5228
5229
		$jetpack_signature = new Jetpack_Signature( $token->secret, (int) Jetpack_Options::get_option( 'time_diff' ) );
5230
		if ( isset( $_POST['_jetpack_is_multipart'] ) ) {
@@ 5267-5270 (lines=4) @@
5264
		} else if ( is_wp_error( $signature ) ) {
5265
			$this->xmlrpc_verification = $signature;
5266
			return $signature;
5267
		} else if ( ! hash_equals( $signature, $_GET['signature'] ) ) {
5268
			$this->xmlrpc_verification = new WP_Error( 'signature_mismatch', 'Signature mismatch', compact( 'signature_details' ) );
5269
			return $this->xmlrpc_verification;
5270
		}
5271
5272
		$timestamp = (int) $_GET['timestamp'];
5273
		$nonce     = stripslashes( (string) $_GET['nonce'] );