| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 22 | class SettingsModelMapper |
||
| 23 | { |
||
| 24 | public function getReadModelFromArray(array $data): SettingsReadModel |
||
| 25 | { |
||
| 26 | $symbol = Currency::fromString($data['currency']); |
||
| 27 | |||
| 28 | return new SettingsReadModel( |
||
| 29 | $data['currency'], |
||
| 30 | $data['locale'], |
||
| 31 | $symbol->symbol(), |
||
| 32 | $data['uuid'] |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getDomainModelFromArray(array $data): Settings |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function getDataFromSettings(Settings $settings): array |
||
| 51 | ]; |
||
| 52 | } |
||
| 54 |