|
23 | 23 | * |
24 | 24 | * @access private |
25 | 25 | * |
26 | | - * @phpstan-type AwarenessState array{client_id: string, state: array<string, mixed>, user_id: int, timestamp: int} |
| 26 | + * @phpstan-type AwarenessState array{client_id: string, state: array<mixed, mixed>, user_id: int, timestamp: int} |
27 | 27 | */ |
28 | 28 | class WP_Collaboration_Table_Storage { |
29 | 29 | /** |
@@ -225,7 +225,7 @@ public function get_updates_after_cursor( string $room, int $cursor ): array { |
225 | 225 | */ |
226 | 226 |
|
227 | 227 | // Snapshot the current max ID and total row count in a single query. |
228 | | - /** @var object{ max_id: int, total: int } $snapshot */ |
| 228 | + /** @var object{ max_id: string, total: string } $snapshot */ |
229 | 229 | $snapshot = $wpdb->get_row( |
230 | 230 | $wpdb->prepare( |
231 | 231 | "SELECT COALESCE( MAX( collaboration_id ), 0 ) AS max_id, COUNT(*) AS total FROM {$wpdb->collaboration} WHERE room = %s AND type != 'awareness'", |
@@ -398,6 +398,7 @@ public function set_awareness_state( string $room, string $client_id, array $sta |
398 | 398 | * |
399 | 399 | * In the event of a race condition, the latest row will be returned as the update target. |
400 | 400 | */ |
| 401 | + /** @var object{ collaboration_id: string, date_gmt: string, data: string }|null $exists */ |
401 | 402 | $exists = $wpdb->get_row( |
402 | 403 | $wpdb->prepare( |
403 | 404 | "SELECT collaboration_id, date_gmt, data FROM {$wpdb->collaboration} WHERE room = %s AND type = 'awareness' AND client_id = %s ORDER BY collaboration_id DESC LIMIT 1", |
|
0 commit comments