| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function fromResponse(Response $response): self |
||
| 22 | { |
||
| 23 | $url = trim(Arr::get($response->getRawHeaders(), '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 | 'contact' => $response->getBody()['contact'], |
||
| 31 | 'agreement' => $response->getBody()['agreement'] ?? '', |
||
| 32 | 'initialIp' => $response->getBody()['initialIp'], |
||
| 33 | 'createdAt' => $response->getBody()['createdAt'], |
||
| 34 | ]); |
||
| 37 |