| Total Complexity | 3 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | class MinistryOfTruth |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Returns array of sanity tag groups (DTOs) created by specified data in format of integration layer |
||
| 28 | * |
||
| 29 | * @param GroupData[] $groups Array of sanity tags group structures from external microservice |
||
| 30 | * |
||
| 31 | * @return GroupDto[] |
||
| 32 | */ |
||
| 33 | public function convertTagGroups(array $groups): array |
||
| 34 | { |
||
| 35 | $groupDtoArray = []; |
||
| 36 | |||
| 37 | foreach ($groups as $group) { |
||
| 38 | $groupDtoArray[] = $this->convertTagGroup($group); |
||
| 39 | } |
||
| 40 | |||
| 41 | return $groupDtoArray; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Returns sanity tags group dto created by specified data in format of integration layer |
||
| 46 | * |
||
| 47 | * @param GroupData $group Sanity tags group structure from external microservice |
||
| 48 | * |
||
| 49 | * @return GroupDto |
||
| 50 | */ |
||
| 51 | public function convertTagGroup(GroupData $group): GroupDto |
||
| 65 | } |
||
| 66 | } |
||
| 67 |