Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function search(array $parameters = array()) |
||
19 | { |
||
20 | $parameters = array_merge($parameters, [ |
||
21 | 'search_type' => SearchResult::TYPE_RECORD |
||
22 | ]); |
||
23 | |||
24 | $response = $this->query('POST', 'v2/search/', array(), $parameters); |
||
25 | |||
26 | if ($response->isEmpty()) { |
||
27 | throw new RuntimeException('Response content is empty'); |
||
28 | } |
||
29 | |||
30 | return SearchResults::fromValue($this->em, $parameters['search_type'], $response->getResult()); |
||
31 | } |
||
32 | } |
||
33 |