diff options
Diffstat (limited to 'Echo/includes/formatters/EchoEventFormatter.php')
-rw-r--r-- | Echo/includes/formatters/EchoEventFormatter.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Echo/includes/formatters/EchoEventFormatter.php b/Echo/includes/formatters/EchoEventFormatter.php index f66b3ce9..0e81b3c4 100644 --- a/Echo/includes/formatters/EchoEventFormatter.php +++ b/Echo/includes/formatters/EchoEventFormatter.php @@ -14,6 +14,13 @@ use MediaWiki\Logger\LoggerFactory; * arguments passed in the constructor (user and language) */ abstract class EchoEventFormatter { + + /** @var User */ + protected $user; + + /** @var Language */ + protected $language; + public function __construct( User $user, Language $language ) { $this->user = $user; $this->language = $language; @@ -23,13 +30,14 @@ abstract class EchoEventFormatter { * Equivalent to IContextSource::msg for the current * language * + * @param string ...$args * @return Message */ - protected function msg( /* ,,, */ ) { + protected function msg( ...$args ) { /** * @var Message $msg */ - $msg = wfMessage( ...func_get_args() ); + $msg = wfMessage( ...$args ); $msg->inLanguage( $this->language ); return $msg; |