diff options
author | Bartosz Dziewoński <matma.rex@gmail.com> | 2022-01-26 20:58:54 +0100 |
---|---|---|
committer | Bartosz Dziewoński <matma.rex@gmail.com> | 2022-01-31 20:19:34 +0000 |
commit | d5326a88fbd59d16d51a20e12e41e4f61668b712 (patch) | |
tree | 6ab0080b72deb9824c7b507e5de88c3ade4658bc /includes/logging | |
parent | 16d1a8197ebc7e247689e6696160dd7e63f1117a (diff) | |
download | mediawikicore-d5326a88fbd59d16d51a20e12e41e4f61668b712.tar.gz mediawikicore-d5326a88fbd59d16d51a20e12e41e4f61668b712.zip |
LogEventsList: Simplify using the `...` splat operator
Change-Id: I84ce3a22e1f764f9797d40ca540a10492cbed151
Diffstat (limited to 'includes/logging')
-rw-r--r-- | includes/logging/LogEventsList.php | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/includes/logging/LogEventsList.php b/includes/logging/LogEventsList.php index 2faeec8265df..7712a166a01f 100644 --- a/includes/logging/LogEventsList.php +++ b/includes/logging/LogEventsList.php @@ -692,14 +692,7 @@ class LogEventsList extends ContextSource { 'lang' => $lang, ] ); - // @phan-suppress-next-line PhanSuspiciousValueComparison - if ( count( $msgKey ) == 1 ) { - $s .= $context->msg( $msgKey[0] )->parseAsBlock(); - } else { // Process additional arguments - $args = $msgKey; - array_shift( $args ); - $s .= $context->msg( $msgKey[0], $args )->parseAsBlock(); - } + $s .= $context->msg( ...$msgKey )->parseAsBlock(); } $s .= $loglist->beginLogEventsList() . $logBody . |