Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
ForceCreateLocalUserLogFormatter
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 getMessageKey
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getMessageParameters
0.00% covered (danger)
0.00%
0 / 5
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\CentralAuth\LogFormatter;
4
5use LogFormatter;
6use MediaWiki\Message\Message;
7use MediaWiki\User\User;
8
9/**
10 * Handles the following log types:
11 * - newusers/forcecreatelocal
12 */
13class ForceCreateLocalUserLogFormatter extends LogFormatter {
14
15    /** @inheritDoc */
16    protected function getMessageKey() {
17        return 'logentry-newusers-forcecreatelocal';
18    }
19
20    /** @inheritDoc */
21    protected function getMessageParameters() {
22        $params = parent::getMessageParameters();
23        $target = User::newFromName( $this->entry->getTarget()->getText(), false );
24        $params[2] = Message::rawParam( $this->makeUserLink( $target ) );
25        $params[3] = $target->getName();
26        return $params;
27    }
28}