Coding Standards: Use strict comparison for return type checks in a few functions:

* `get_bookmark()`
* `get_comment()`
* `get_post()`
* `get_children()`
* `wp_get_recent_posts()`
* `wp_get_post_revision()`
* `wp_get_nav_menu_items()`

Follow-up to [45710] for `get_term()`, [48507] for `wpdb::get_row()` and `wpdb::get_results()`.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-03-21 12:39:25 +00:00
parent eea4f303a1
commit 05566e992d
5 changed files with 19 additions and 17 deletions
+3 -3
View File
@@ -218,11 +218,11 @@ function get_comment( $comment = null, $output = OBJECT ) {
*/
$_comment = apply_filters( 'get_comment', $_comment );
if ( OBJECT == $output ) {
if ( OBJECT === $output ) {
return $_comment;
} elseif ( ARRAY_A == $output ) {
} elseif ( ARRAY_A === $output ) {
return $_comment->to_array();
} elseif ( ARRAY_N == $output ) {
} elseif ( ARRAY_N === $output ) {
return array_values( $_comment->to_array() );
}
return $_comment;