| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 54.55% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | final class PromiseResponse extends Response implements PromiseInterface |
||
| 13 | { |
||
| 14 | private PromiseInterface $promise; |
||
| 15 | protected $stream; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param PromiseInterface $promise |
||
| 19 | * @param mixed $body |
||
| 20 | * @param int $status |
||
| 21 | * @param array $headers |
||
| 22 | */ |
||
| 23 | 10 | public function __construct( |
|
| 31 | 10 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @param callable<Generator> $callback |
||
| 35 | * @return static |
||
| 36 | */ |
||
| 37 | public static function fromGeneratorCallback(callable $callback): self |
||
| 44 | })); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param callable|null $onFulfilled |
||
| 49 | * @param callable|null $onRejected |
||
| 50 | * @param callable|null $onProgress |
||
| 51 | */ |
||
| 52 | 10 | final public function then( |
|
| 60 |