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