| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 92.86% |
| 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 | 2 | public function get($name) |
|
| 26 | { |
||
| 27 | 2 | if (!isset($this->formatters[$name])) { |
|
| 28 | 2 | $this->formatters[$name] = $this->resolve($name); |
|
| 29 | } |
||
| 30 | 2 | return $this->formatters[$name]; |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param $name |
||
| 35 | * @return Repository |
||
| 36 | */ |
||
| 37 | 1 | protected function resolve($name) |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param $name |
||
| 44 | * @param array $config |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | 1 | protected function create($name, $config = []) |
|
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param array $config |
||
| 59 | * @return HtmlFormatter |
||
| 60 | */ |
||
| 61 | 1 | protected function createHtmlFormatter($config = []) |
|
| 67 |