Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.4746 |
Changes | 0 |
1 | <?php |
||
34 | 6 | public function execute($key, $fops) |
|
35 | { |
||
36 | 6 | $url = $this->buildUrl($key, $fops); |
|
37 | 6 | $resp = Client::get($url); |
|
38 | 6 | if (!$resp->ok()) { |
|
39 | 6 | return array(null, new Error($url, $resp)); |
|
40 | } |
||
41 | if ($resp->json() !== null) { |
||
42 | return array($resp->json(), null); |
||
43 | } |
||
44 | return array($resp->body, null); |
||
45 | } |
||
46 | |||
61 |