| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class PromiseResponse extends Response implements PromiseInterface |
||
| 11 | { |
||
| 12 | private $promise; |
||
| 13 | |||
| 14 | public function __construct( |
||
| 15 | PromiseInterface $promise, |
||
| 16 | $body = 'php://tmp', |
||
| 17 | int $status = 200, |
||
| 18 | array $headers = [] |
||
| 19 | ) { |
||
| 20 | parent::__construct($status, $headers, $body); |
||
| 21 | $this->promise = $promise; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null) |
||
| 25 | { |
||
| 26 | return $this->promise->then($onFulfilled, $onRejected, $onProgress); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function promise(): PromiseInterface |
||
| 32 | } |
||
| 33 | } |
||
| 34 |