| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function convert(array $data, string $currency): array |
||
| 28 | { |
||
| 29 | $value = 0; |
||
| 30 | |||
| 31 | foreach ($data as $items) { |
||
| 32 | foreach ($this->getTotal($items) as $total) { |
||
| 33 | $value += $total; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | return [ |
||
| 38 | 'currency' => $currency, |
||
| 39 | 'value' => $this->intToStringConverter->convertIntToString($value, 100), |
||
| 40 | ]; |
||
| 51 |