Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | public function __invoke(Task $task): Result |
||
34 | 3 | { |
|
35 | 3 | $response = $this->httpClient->request($task->getMethod(), $task->getUrl(), $task->getOptions()); |
|
36 | 1 | $content = $response->getContent(); |
|
37 | $output = \array_merge($response->getInfo('response_headers'), ['', $content]); |
||
38 | 1 | ||
39 | return Result::successful($task, \implode("\n", $output)); |
||
40 | } |
||
47 |