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