Skip to content
This repository was archived by the owner on Jul 26, 2025. It is now read-only.

Commit d1153a4

Browse files
committed
fix: foramtter provided in the constructor is being ignored
1 parent e266964 commit d1153a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Nuxed/Translation/Translator.hack

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class Translator
2525
*/
2626
public function __construct(
2727
?string $locale = null,
28-
?Formatter\IMessageFormatter $_formatter = null,
28+
?Formatter\IMessageFormatter $formatter = null,
2929
) {
30-
$this->formatter = new Formatter\MessageFormatter();
30+
$this->formatter = $formatter ?? new Formatter\MessageFormatter();
3131
$this->setLocale($locale ?? \Locale::getDefault());
3232
}
3333

0 commit comments

Comments
 (0)