mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-12-22 04:33:16 +00:00
8f81812242
This is not really anything new. Most code already followed these sniffs. This patch just fixes the remaining exceptions. Also: * Remove PHPDoc blocks that don't add anything but just repeat the strict types. * Remove @file comments in favor of class-level comments. * Add strict types where possible, most notably some `void`. Change-Id: Iff6872dff68170b0fc4e82ac2ba3cad385e8773e
26 lines
488 B
PHP
26 lines
488 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\TemplateData;
|
|
|
|
use Language;
|
|
use MessageLocalizer;
|
|
|
|
/**
|
|
* @license GPL-2.0-or-later
|
|
* @codeCoverageIgnore Trivial facade
|
|
*/
|
|
class TemplateDataMessageLocalizer implements MessageLocalizer {
|
|
|
|
private Language $language;
|
|
|
|
public function __construct( Language $language ) {
|
|
$this->language = $language;
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
public function msg( $key, ...$params ) {
|
|
return wfMessage( $key, ...$params )->inLanguage( $this->language );
|
|
}
|
|
|
|
}
|