Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.7085 |
Changes | 0 |
1 | <?php |
||
37 | 6 | public function getProfilePicture($userid = "me") { |
|
38 | 6 | $data = $this->user_requester->get("people/$userid/picture", array("redirect" => "false")); |
|
39 | 6 | if (isset($data["error"])) { |
|
40 | 6 | throw new WrapItResponseException($data["error"]["message"]); |
|
41 | } |
||
42 | |||
43 | if (isset($data["url"])) { |
||
44 | return $data["url"]; |
||
45 | } else { |
||
46 | throw new WrapItResponseException("Unknown Exception"); |
||
47 | } |
||
48 | } |
||
49 | |||
51 |