Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
14 | 6 | public function execute( |
|
15 | HttpClient $client, |
||
16 | Targets $targets, |
||
17 | RequestInterface $request, |
||
18 | ResponseInterface $response, |
||
19 | string $action |
||
20 | ): ResponseInterface { |
||
21 | 6 | foreach ($targets as $target) { |
|
22 | 6 | $response = $client->send($request, $target, $action); |
|
23 | 6 | if ($this->responseIsSuccessful($response)) { |
|
24 | 6 | return $response; |
|
25 | } |
||
26 | } |
||
27 | 3 | return $response; |
|
28 | } |
||
29 | |||
35 |