Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | public function retrieve(string $resourceClass, $id, array $context) |
||
33 | { |
||
34 | if ($resourceClass !== Translation::class) { |
||
35 | throw new BadConfigurationException(__CLASS__ . ' only works with Translation'); |
||
36 | } |
||
37 | return new Translation($id, $this->translator->get($id, [], $this->application->getLocale()), new Locale($this->application->getLocale())); |
||
|
|||
38 | } |
||
45 |