Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0176 |
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 | 3 | return array(null, new Error($url, $resp)); |
|
40 | } |
||
41 | 3 | if ($resp->json() !== null) { |
|
42 | 3 | return array($resp->json(), null); |
|
43 | } |
||
44 | return array($resp->body, null); |
||
45 | } |
||
46 | |||
61 |