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