| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public static function fromResponse(Response $response): AccountData |
||
| 24 | { |
||
| 25 | $url = trim(Arr::get($response->getRawHeaders(), 'Location', '')); |
||
| 26 | |||
| 27 | return new self( |
||
| 28 | id: Url::extractId($url), |
||
| 29 | url: $url, |
||
| 30 | key: $response->getBody()['key'], |
||
| 31 | status: $response->getBody()['status'], |
||
| 32 | contact: $response->getBody()['contact'], |
||
| 33 | agreement: $response->getBody()['agreement'] ?? '', |
||
| 34 | initialIp: $response->getBody()['initialIp'], |
||
| 35 | createdAt: $response->getBody()['createdAt'] |
||
| 36 | ); |
||
| 39 |