Skip to content

Commit 20cfe6c

Browse files
committed
Improve docblocks
1 parent 392bd7c commit 20cfe6c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ private function can_user_sync_entity_type( string $entity_kind, string $entity_
272272
return current_user_can( 'edit_post', (int) $object_id );
273273
}
274274

275-
// All of the remaining checks are for collections. If an object ID is
276-
// provided, reject the request.
275+
// All the remaining checks are for collections. If an object ID is provided,
276+
// reject the request.
277277
if ( null !== $object_id ) {
278278
return false;
279279
}
@@ -355,10 +355,10 @@ private function process_awareness_update( string $room, int $client_id, ?array
355355
*
356356
* @since 7.0.0
357357
*
358-
* @param string $room Room identifier.
359-
* @param int $client_id Client identifier.
360-
* @param int $cursor Client cursor (marker of last seen update).
361-
* @param array<string, mixed> $update Sync update with 'type' and 'data' fields.
358+
* @param string $room Room identifier.
359+
* @param int $client_id Client identifier.
360+
* @param int $cursor Client cursor (marker of last seen update).
361+
* @param array{data: string, type: string} $update Sync update.
362362
* @return true|WP_Error True on success, WP_Error on storage failure.
363363
*/
364364
private function process_sync_update( string $room, int $client_id, int $cursor, array $update ) {
@@ -466,7 +466,7 @@ private function add_update( string $room, int $client_id, string $type, string
466466
* should_compact: bool,
467467
* room: string,
468468
* total_updates: int,
469-
* updates: array<int, array{data: string, type: string}>
469+
* updates: array<int, array{data: string, type: string}>,
470470
* } Response data for this room.
471471
*/
472472
private function get_updates( string $room, int $client_id, int $cursor, bool $is_compactor ): array {

src/wp-includes/collaboration/class-wp-sync-post-meta-storage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function add_update( string $room, $update ): bool {
7575
}
7676

7777
/**
78-
* Retrieve all sync updates for a given room.
78+
* Retrieves all sync updates for a given room.
7979
*
8080
* @since 7.0.0
8181
*
@@ -208,7 +208,7 @@ private function get_storage_post_id(): ?int {
208208
return self::$storage_post_id;
209209
}
210210

211-
// Try to find existing post.
211+
// Try to find an existing post.
212212
$posts = get_posts(
213213
array(
214214
'post_type' => self::POST_TYPE,
@@ -225,7 +225,7 @@ private function get_storage_post_id(): ?int {
225225
return self::$storage_post_id;
226226
}
227227

228-
// Create new post if none exists.
228+
// Create new post since none exists.
229229
$post_id = wp_insert_post(
230230
array(
231231
'post_type' => self::POST_TYPE,

src/wp-includes/collaboration/interface-wp-sync-storage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function add_update( string $room, $update ): bool;
2828
public function get_awareness_state( string $room ): array;
2929

3030
/**
31-
* Get the current cursor for a given room. This should return a monotonically
31+
* Gets the current cursor for a given room. This should return a monotonically
3232
* increasing integer that represents the last update that was returned for the
3333
* room during the current request. This allows clients to retrieve updates
3434
* after a specific cursor on subsequent requests.

0 commit comments

Comments
 (0)