| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function me():ResponseInterface{ |
||
| 39 | $response = $this->request('/accounts'); |
||
| 40 | $status = $response->getStatusCode(); |
||
| 41 | |||
| 42 | if($status === 200){ |
||
| 43 | return $response; |
||
| 44 | } |
||
| 45 | |||
| 46 | $json = MessageUtil::decodeJSON($response); |
||
| 47 | |||
| 48 | if(isset($json->error)){ |
||
| 49 | throw new ProviderException($json->error); |
||
| 50 | } |
||
| 51 | |||
| 52 | throw new ProviderException(sprintf('user info error error HTTP/%s', $status)); |
||
| 53 | } |
||
| 56 |