Skip to content

Commit 4bef578

Browse files
committed
Fix: PHPCS feedbacks
1 parent 47cf2c2 commit 4bef578

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/wp-includes/comment.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2816,7 +2816,7 @@ function wp_update_comment_count_now( $post_id ) {
28162816
* Get all the comments related to the post ID.
28172817
*/
28182818
$comments = $wpdb->get_results( $wpdb->prepare( "SELECT comment_ID, comment_parent, comment_approved FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id ) );
2819-
$comments_by_id = [];
2819+
$comments_by_id = array();
28202820

28212821
/**
28222822
* Create a lookup array by comment ID.
@@ -2834,7 +2834,7 @@ function wp_update_comment_count_now( $post_id ) {
28342834
foreach ( $comments as $comment ) {
28352835

28362836
// Proceed only if comment is approved for counting.
2837-
if ( $comment->comment_approved !== '1' ) {
2837+
if ( '1' !== $comment->comment_approved ) {
28382838
continue;
28392839
}
28402840

@@ -2844,14 +2844,14 @@ function wp_update_comment_count_now( $post_id ) {
28442844
/**
28452845
* Check until we get the parent id as 0.
28462846
*/
2847-
while ( $parent_id !== 0 ) {
2847+
while ( 0 !== $parent_id ) {
28482848
if ( ! isset( $comments_by_id[ $parent_id ] ) ) {
28492849
break;
28502850
}
28512851

28522852
$parent_comment = $comments_by_id[ $parent_id ];
28532853

2854-
if ( $parent_comment->comment_approved !== '1' ) {
2854+
if ( '1' !== $parent_comment->comment_approved ) {
28552855
$has_unapproved = true;
28562856
break;
28572857
}

0 commit comments

Comments
 (0)