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