Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
MassMessageSkipLogFormatter | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
getMessageParameters | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace MediaWiki\MassMessage\Logging; |
4 | |
5 | use LogFormatter; |
6 | use MediaWiki\Message\Message; |
7 | |
8 | /** |
9 | * Log formatter for 'skip*' entries on Special:Log/massmessage. |
10 | * Parses the message summary so wikilinks work. |
11 | */ |
12 | |
13 | class MassMessageSkipLogFormatter extends LogFormatter { |
14 | |
15 | /** |
16 | * @return array |
17 | * @suppress PhanTypeArraySuspicious,PhanTypeArraySuspiciousNull the parent fills parsedParameters |
18 | */ |
19 | protected function getMessageParameters() { |
20 | if ( $this->parsedParameters !== null ) { |
21 | return $this->parsedParameters; |
22 | } |
23 | |
24 | parent::getMessageParameters(); |
25 | // Format the edit summary using CommentFormatter::format so that wikilinks |
26 | // and other simple things get parsed, but no HTML |
27 | $this->parsedParameters[3] = Message::rawParam( |
28 | $this->getCommentFormatter()->format( |
29 | // @phan-suppress-next-line PhanTypeMismatchArgumentReal |
30 | $this->parsedParameters[3], |
31 | $this->entry->getTarget() |
32 | ) ); |
33 | |
34 | // Bad things happens if the numbers are not in correct order |
35 | ksort( $this->parsedParameters ); |
36 | return $this->parsedParameters; |
37 | } |
38 | } |