Code Duplication    Length = 3-3 lines in 2 locations

packages/connection/src/Manager.php 2 locations

@@ 1295-1297 (lines=3) @@
1292
				return $suppress_errors ? false : new \WP_Error( 'no_token_for_user', sprintf( 'No token for user %d', $user_id ) );
1293
			}
1294
			$user_token_chunks = explode( '.', $user_tokens[ $user_id ] );
1295
			if ( empty( $user_token_chunks[1] ) || empty( $user_token_chunks[2] ) ) {
1296
				return $suppress_errors ? false : new \WP_Error( 'token_malformed', sprintf( 'Token \'%s\' for user %d is malformed', $user_tokens[ $user_id ], $user_id ) );
1297
			}
1298
			if ( $user_token_chunks[2] !== (string) $user_id ) {
1299
				return $suppress_errors ? false : new \WP_Error( 'user_id_mismatch', sprintf( 'Requesting user_id %d does not match token user_id %d', $user_id, $user_token_chunks[2] ) );
1300
			}
@@ 1298-1300 (lines=3) @@
1295
			if ( empty( $user_token_chunks[1] ) || empty( $user_token_chunks[2] ) ) {
1296
				return $suppress_errors ? false : new \WP_Error( 'token_malformed', sprintf( 'Token \'%s\' for user %d is malformed', $user_tokens[ $user_id ], $user_id ) );
1297
			}
1298
			if ( $user_token_chunks[2] !== (string) $user_id ) {
1299
				return $suppress_errors ? false : new \WP_Error( 'user_id_mismatch', sprintf( 'Requesting user_id %d does not match token user_id %d', $user_id, $user_token_chunks[2] ) );
1300
			}
1301
			$possible_normal_tokens[] = "{$user_token_chunks[0]}.{$user_token_chunks[1]}";
1302
		} else {
1303
			$stored_blog_token = \Jetpack_Options::get_option( 'blog_token' );