| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public static function fromResponse(Response $response): AccountData |
||
| 22 | { |
||
| 23 | $url = trim($response->getHeader('location', '')); |
||
| 24 | |||
| 25 | return new self( |
||
| 26 | id: Url::extractId($url), |
||
| 27 | url: $url, |
||
| 28 | key: $response->getBody()['key'], |
||
| 29 | status: $response->getBody()['status'], |
||
| 30 | agreement: $response->getBody()['agreement'] ?? '', |
||
| 31 | createdAt: $response->getBody()['createdAt'] |
||
| 32 | ); |
||
| 35 |