Skip to content
Snippets Groups Projects
Commit 42637c96 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix method signature

parent 7cf3718a
No related branches found
No related tags found
No related merge requests found
...@@ -21,14 +21,10 @@ class TwigTranslator implements TranslatorInterface ...@@ -21,14 +21,10 @@ class TwigTranslator implements TranslatorInterface
private $translator; private $translator;
/** /**
* @param callable|null $translator * @param callable $translator
*/ */
public function __construct(callable $translator = null) public function __construct(callable $translator)
{ {
if (!is_callable($translator)) {
$translator = fn($string) => gettext($string);
}
$this->translator = $translator; $this->translator = $translator;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment