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