Skip to content

Commit 584ccf5

Browse files
authored
Update return types in Inbox and Posts classes (#2361)
1 parent 04e0c36 commit 584ccf5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

includes/collection/class-inbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private static function get_object_title( $activity_object ) {
125125
*
126126
* @param int $id The inbox item id.
127127
*
128-
* @return WP_Post|null The inbox item or null.
128+
* @return \WP_Post|null The inbox item or null.
129129
*/
130130
public static function get( $id ) {
131131
return \get_post( $id );

includes/collection/class-posts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static function update( $activity, $user_id ) {
132132
*
133133
* @param int $id The object ID.
134134
*
135-
* @return bool|int|null The deleted post ID, false on failure, or null if no post to delete.
135+
* @return \WP_Post|false|null Post data on success, false or null on failure.
136136
*/
137137
public static function delete( $id ) {
138138
return \wp_delete_post( $id, true );
@@ -143,7 +143,7 @@ public static function delete( $id ) {
143143
*
144144
* @param string $guid The object GUID.
145145
*
146-
* @return bool|int|null The deleted post ID, false on failure, or null if no post to delete.
146+
* @return \WP_Post|\WP_Error|false|null Post data on success, false or null on failure, or WP_Error if no post to delete.
147147
*/
148148
public static function delete_by_guid( $guid ) {
149149
$post = self::get_by_guid( $guid );

0 commit comments

Comments
 (0)