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