Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | public function import(string $projectKey, string $ext, string $body, array $params) |
||
35 | { |
||
36 | $params['key'] = $projectKey; |
||
37 | $response = $this->httpPostRaw(sprintf('/api/import/%s?%s', $ext, http_build_query($params)), $body); |
||
38 | |||
39 | if (!$this->hydrator) { |
||
40 | return $response; |
||
41 | } |
||
42 | |||
43 | if (200 !== $response->getStatusCode() && 201 !== $response->getStatusCode()) { |
||
44 | $this->handleErrors($response); |
||
45 | } |
||
46 | |||
47 | return $this->hydrator->hydrate($response, Imported::class); |
||
48 | } |
||
50 |