Docs: Improve @return description for wp_update_comment() and WP_UnitTest_Factory_For_Comment::update_object().

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47017 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2019-12-27 00:28:39 +00:00
parent 004023d493
commit 85c7a64791
2 changed files with 3 additions and 3 deletions

View File

@ -2316,7 +2316,7 @@ function wp_set_comment_status( $comment_id, $comment_status, $wp_error = false
* @global wpdb $wpdb WordPress database abstraction object. * @global wpdb $wpdb WordPress database abstraction object.
* *
* @param array $commentarr Contains information on the comment. * @param array $commentarr Contains information on the comment.
* @return int Comment was updated if value is 1, or was not updated if value is 0. * @return int The value 1 if the comment was updated, 0 if not updated.
*/ */
function wp_update_comment( $commentarr ) { function wp_update_comment( $commentarr ) {
global $wpdb; global $wpdb;

View File

@ -27,7 +27,7 @@ class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing {
* *
* @param array $args The comment details. * @param array $args The comment details.
* *
* @return false|int The comment's ID on success, false on failure. * @return int|false The comment's ID on success, false on failure.
*/ */
public function create_object( $args ) { public function create_object( $args ) {
return wp_insert_comment( $this->addslashes_deep( $args ) ); return wp_insert_comment( $this->addslashes_deep( $args ) );
@ -39,7 +39,7 @@ class WP_UnitTest_Factory_For_Comment extends WP_UnitTest_Factory_For_Thing {
* @param int $comment_id The comment ID. * @param int $comment_id The comment ID.
* @param array $fields The comment details. * @param array $fields The comment details.
* *
* @return int When updated 1, not update 0. * @return int The value 1 if the comment was updated, 0 if not updated.
*/ */
public function update_object( $comment_id, $fields ) { public function update_object( $comment_id, $fields ) {
$fields['comment_ID'] = $comment_id; $fields['comment_ID'] = $comment_id;