Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
43 | 1 | public function post( |
|
44 | ResponseInterface $response, |
||
45 | string $transactionId, |
||
46 | array $options = [] |
||
47 | ): CancellablePromiseInterface { |
||
48 | 1 | foreach (self::HEADERS as $header => $method) { |
|
49 | 1 | if (!$response->hasHeader($header)) { |
|
50 | 1 | continue; |
|
51 | } |
||
52 | |||
53 | 1 | $this->state->$method((int)$response->getHeaderLine($header)); |
|
54 | } |
||
55 | |||
56 | 1 | return resolve($response); |
|
57 | } |
||
58 | } |
||
59 |