Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
43 | 2 | public function doQuery( $params ) { |
|
44 | 2 | $result = json_decode( $this->client->get( |
|
45 | 2 | $this->apiUrl, |
|
46 | 2 | [ 'query' => $params ] |
|
47 | 2 | )->getBody(), true ); |
|
48 | |||
49 | 2 | if ( $result['status']['error'] !== 'OK' ) { |
|
50 | 1 | throw new WikibaseQueryApiException( $result['status']['error'] ); |
|
51 | } |
||
52 | |||
53 | 1 | return $result; |
|
54 | } |
||
55 | } |
||
56 |