| Total Complexity | 3 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | trait TransformsAccounts |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param array $accounts |
||
| 13 | * |
||
| 14 | * @throws \TestMonitor\DevOps\Exceptions\InvalidDataException |
||
| 15 | * |
||
| 16 | * @return \TestMonitor\DevOps\Resources\Account[] |
||
| 17 | */ |
||
| 18 | 1 | protected function fromDevOpsAccounts($accounts): array |
|
| 19 | { |
||
| 20 | 1 | Validator::isArray($accounts); |
|
| 21 | |||
| 22 | 1 | return array_map(function ($account) { |
|
| 23 | 1 | return $this->fromDevOpsAccount($account); |
|
| 24 | 1 | }, $accounts); |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param array $account |
||
| 29 | * |
||
| 30 | * @throws \TestMonitor\DevOps\Exceptions\InvalidDataException |
||
| 31 | * |
||
| 32 | * @return \TestMonitor\DevOps\Resources\Account |
||
| 33 | */ |
||
| 34 | 1 | protected function fromDevOpsAccount($account): Account |
|
| 41 | 1 | ]); |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param array $profile |
||
| 46 | * @return \TestMonitor\DevOps\Resources\Profile |
||
| 47 | */ |
||
| 48 | 2 | protected function fromDevOpsProfile($profile): Profile |
|
| 59 |