Total Complexity | 1 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
20 | class TranslatorFactory |
||
21 | { |
||
22 | /** |
||
23 | * |
||
24 | * The class to use for new instances. |
||
25 | * |
||
26 | * @var string |
||
27 | * |
||
28 | */ |
||
29 | protected $class = Translator::class; |
||
30 | |||
31 | /** |
||
32 | * |
||
33 | * Returns a new Translator. |
||
34 | * |
||
35 | * @param string $locale The locale code for the translator. |
||
36 | * |
||
37 | * @param Package $package The localized package for the translator. |
||
38 | * |
||
39 | * @param FormatterInterface $formatter The formatter to use for |
||
40 | * interpolating token values. |
||
41 | * |
||
42 | * @param TranslatorInterface $fallback A fallback translator to use, if |
||
43 | * any. |
||
44 | * |
||
45 | * @return Translator |
||
46 | * |
||
47 | */ |
||
48 | 5 | public function newInstance( |
|
58 |