Skip to content

Commit

Permalink
avoid fall-through
Browse files Browse the repository at this point in the history
props @obenland
  • Loading branch information
pfefferle committed Jan 20, 2025
1 parent fbd4b9a commit b0cd5be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/transformer/class-factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ public static function get_transformer( $data ) {
} elseif ( ! is_post_disabled( $data ) ) {
return new Post( $data );
}
// fall-through.
break;
case 'WP_Comment':
if ( ! is_local_comment( $data ) ) {
return new Comment( $data );
}
// fall-through.
break;
case 'WP_User':
if ( ! is_user_disabled( $data->ID ) ) {
return new User( $data );
}
// fall-through.
default:
return null;
break;
}

return null;
}
}

0 comments on commit b0cd5be

Please sign in to comment.