wp-admin/includes/class-wp-importer.php:182$user_idintint|void public function set_user( $user_id ) { if ( is_numeric( $user_id ) ) { $user_id = (int) $user_id; } else { $user_id = (int) username_exists( $user_id ); } if ( ! $user_id || ! wp_set_current_user( $user_id ) ) { fwrite( STDERR, "Error: can not find user\n" ); exit; } return $user_id; }One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
int|void to int.verified against sourcesrc/wp-admin/includes/class-wp-importer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.