@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | protected static function find($id, $action = Organisations::ORG, $cache = false, $raw = false) |
| 40 | 40 | { |
| 41 | - $cache = ($cache === true)? "cache" : "live"; |
|
| 41 | + $cache = ($cache === true) ? "cache" : "live"; |
|
| 42 | 42 | |
| 43 | 43 | $params = [ |
| 44 | 44 | 'api_source' => $cache, |
@@ -50,11 +50,12 @@ |
||
| 50 | 50 | ]; |
| 51 | 51 | |
| 52 | 52 | $response = json_decode(self::$client->getResult($params)->getBody()->getContents(), true); |
| 53 | - if ($response['request_stats']['query_status'] == "success") |
|
| 54 | - if ($raw === true) |
|
| 53 | + if ($response['request_stats']['query_status'] == "success") { |
|
| 54 | + if ($raw === true) |
|
| 55 | 55 | return $response; |
| 56 | - else |
|
| 57 | - return self::fillModel($action, $response['data']); |
|
| 56 | + } else { |
|
| 57 | + return self::fillModel($action, $response['data']); |
|
| 58 | + } |
|
| 58 | 59 | |
| 59 | 60 | return false; |
| 60 | 61 | } |