Merge "ThreadItem: Remove redundant check"

This commit is contained in:
jenkins-bot 2021-09-03 20:37:52 +00:00 committed by Gerrit Code Review
commit 54d5d06e27

View file

@ -65,10 +65,7 @@ abstract class ThreadItem implements JsonSerializable {
$authors = [];
$getAuthorSet = static function ( ThreadItem $comment ) use ( &$authors, &$getAuthorSet ) {
if ( $comment instanceof CommentItem ) {
$author = $comment->getAuthor();
if ( $author ) {
$authors[ $author ] = true;
}
$authors[ $comment->getAuthor() ] = true;
}
// Get the set of authors in the same format from each reply
array_map( $getAuthorSet, $comment->getReplies() );