Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
21 | class UnderscoreToSpaceFormatter implements FormatterInterface |
||
22 | { |
||
23 | /** @var FormatterInterface */ |
||
24 | protected $formatter; |
||
25 | |||
26 | /** |
||
27 | * UnderscoreToSpaceFormatter constructor. |
||
28 | */ |
||
29 | public function __construct() |
||
30 | { |
||
31 | 3 | $this->formatter = new Formatter(function ($var) { |
|
32 | 2 | return str_replace('_', ' ', $var); |
|
33 | 3 | }); |
|
34 | 3 | } |
|
35 | |||
36 | /** |
||
37 | * @param array $data |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | 2 | public function format(array $data): array |
|
44 | } |
||
45 | } |
||
46 |