Skip to content

Commit 92152e8

Browse files
committed
Improve return types
1 parent 61d0b73 commit 92152e8

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/wp-includes/collaboration/class-wp-http-polling-sync-server.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ private function can_user_sync_entity_type( string $entity_kind, string $entity_
302302
* @param string $room Room identifier.
303303
* @param int $client_id Client identifier.
304304
* @param array<string, mixed>|null $awareness_update Awareness state sent by the client.
305-
* @return array<int, array<string, array<string, mixed>>> Updated awareness state for the room.
305+
* @return array<int, array<string, mixed>> Map of client ID to awareness state.
306306
*/
307307
private function process_awareness_update( string $room, int $client_id, ?array $awareness_update ): array {
308308
$existing_awareness = $this->storage->get_awareness_state( $room );
@@ -456,7 +456,13 @@ private function add_update( string $room, int $client_id, string $type, string
456456
* @param int $client_id Client identifier.
457457
* @param int $cursor Return updates after this cursor.
458458
* @param bool $is_compactor True if this client is nominated to perform compaction.
459-
* @return array<string, mixed> Response data for this room.
459+
* @return array{
460+
* compaction_request: array|null,
461+
* end_cursor: int,
462+
* room: string,
463+
* total_updates: int,
464+
* updates: array<int, array{data: string, type: string}>
465+
* } Response data for this room.
460466
*/
461467
private function get_updates( string $room, int $client_id, int $cursor, bool $is_compactor ): array {
462468
$updates_after_cursor = $this->storage->get_updates_after_cursor( $room, $cursor );

0 commit comments

Comments
 (0)