1 | <?php |
||
21 | final class Promise implements HttpPromise |
||
22 | { |
||
23 | /** |
||
24 | * Promise status. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | private $state = HttpPromise::PENDING; |
||
29 | |||
30 | /** |
||
31 | * PSR7 received response. |
||
32 | * |
||
33 | * @var ResponseInterface |
||
34 | */ |
||
35 | private $response; |
||
36 | |||
37 | /** |
||
38 | * Execution error. |
||
39 | * |
||
40 | * @var Exception |
||
41 | */ |
||
42 | private $exception; |
||
43 | |||
44 | /** |
||
45 | * HTTP Request |
||
46 | * |
||
47 | * @var RequestInterface |
||
48 | */ |
||
49 | private $request; |
||
50 | |||
51 | /** |
||
52 | * Adapted ReactPHP promise |
||
53 | * |
||
54 | * @var PromiseInterface |
||
55 | */ |
||
56 | private $promise; |
||
57 | |||
58 | /** |
||
59 | * ReactPHP LoopInterface |
||
60 | * |
||
61 | * @var LoopInterface |
||
62 | */ |
||
63 | private $loop; |
||
64 | |||
65 | 110 | public function __construct(PromiseInterface $promise, LoopInterface $loop, RequestInterface $request) |
|
100 | |||
101 | 54 | public function then(?callable $onFulfilled = null, ?callable $onRejected = null) |
|
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | 110 | public function getState() |
|
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | 110 | public function wait($unwrap = true) |
|
135 | } |
||
136 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..