Skip to content

Commit 6efbeed

Browse files
committed
lint: use @var instead of not is_array check
1 parent c26733a commit 6efbeed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Comment_Command.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -808,17 +808,15 @@ private function check_optional_args_and_all( $args, $all, $verb = 'delete' ) {
808808
*/
809809
private function get_all_comment_ids(): array {
810810
$query = new WP_Comment_Query();
811+
812+
/** @var array $comments */
811813
$comments = $query->query(
812814
array(
813815
'fields' => 'ids',
814816
'number' => 0, // Get all comments
815817
)
816818
);
817819

818-
if ( ! is_array( $comments ) ) {
819-
return [];
820-
}
821-
822820
return $comments;
823821
}
824822
}

0 commit comments

Comments
 (0)