ThreadItem: Remove redundant check

CommentItem::getAuthor() used to return null in the past.

Change-Id: I66f4e83b51b6efef7441d4b963f6db09571d9393
This commit is contained in:
Bartosz Dziewoński 2021-09-03 21:10:59 +02:00
parent 49aacb31e6
commit 317c608eda

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() );