mediawiki-extensions-Templa.../includes/TemplateDataMessageLocalizer.php
thiemowmde 8f81812242 Enable and enforce a few extra PHPCS sniffs
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
2023-09-06 18:15:22 +02:00

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