| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 59 | public function detail(string $code) |
||
| 60 | { |
||
| 61 | $response = $this->httpClient->request( |
||
| 62 | 'GET', |
||
| 63 | self::SERVICE_URI. '/' . $code |
||
| 64 | ); |
||
| 65 | |||
| 66 | $body = json_decode((string) $response->getBody(), true); |
||
| 67 | |||
| 68 | return new Address( |
||
| 69 | $body['destinataire'], |
||
| 70 | $body['pointRemise'], |
||
| 71 | $body['numeroVoie'], |
||
| 72 | $body['libelleVoie'], |
||
| 73 | $body['lieuDit'], |
||
| 74 | $body['codePostal'], |
||
| 75 | $body['codeCedex'], |
||
| 76 | $body['commune'], |
||
| 77 | $body['blocAdresse'] |
||
| 78 | ); |
||
| 81 |