Total Complexity | 6 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class Manager |
||
16 | { |
||
17 | use SingletonTrait; |
||
18 | |||
19 | protected $formatters = []; |
||
20 | |||
21 | /** |
||
22 | * @param $name |
||
23 | * @return MoneyFormatter |
||
24 | */ |
||
25 | public function get($name) |
||
26 | { |
||
27 | $this->formatters[$name] = isset($this->formatters[$name]) ?: $this->resolve($name); |
||
28 | return $this->formatters[$name]; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param $name |
||
33 | * @return Repository |
||
34 | */ |
||
35 | protected function resolve($name) |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param $name |
||
42 | * @param array $config |
||
43 | * @return mixed |
||
44 | */ |
||
45 | protected function create($name, $config = []) |
||
52 | } |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param array $config |
||
57 | * @return HtmlFormatter |
||
58 | */ |
||
59 | protected function createHtmlFormatter($config = []) |
||
65 |