Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function analyze(string $text, array $params = []) |
||
26 | { |
||
27 | $params[self::PARAM_TEXT] = $text; |
||
28 | |||
29 | $response = $this->post(self::API_ENDPOINT, $params); |
||
30 | |||
31 | if (200 !== $response->getStatusCode()) { |
||
32 | $this->handleErrors($response); |
||
33 | } |
||
34 | |||
35 | return $this->hydrator->hydrate($response, DocumentAnalysis::class); |
||
36 | } |
||
38 |