1 | <?php |
||
17 | class Promise implements HttpPromise |
||
18 | { |
||
19 | /** |
||
20 | * @var PromiseInterface |
||
21 | */ |
||
22 | private $promise; |
||
23 | |||
24 | /** |
||
25 | * @var string State of the promise |
||
26 | */ |
||
27 | private $state; |
||
28 | |||
29 | /** |
||
30 | * @var ResponseInterface |
||
31 | */ |
||
32 | private $response; |
||
33 | |||
34 | /** |
||
35 | * @var HttplugException |
||
36 | */ |
||
37 | private $exception; |
||
38 | |||
39 | /** |
||
40 | * @var RequestInterface |
||
41 | */ |
||
42 | private $request; |
||
43 | |||
44 | /** |
||
45 | * @param PromiseInterface $promise |
||
46 | * @param RequestInterface $request |
||
47 | */ |
||
48 | 326 | public function __construct(PromiseInterface $promise, RequestInterface $request) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 165 | public function then(callable $onFulfilled = null, callable $onRejected = null) |
|
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | 316 | public function getState() |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 325 | public function wait($unwrap = true) |
|
105 | |||
106 | /** |
||
107 | * Converts a Guzzle exception into an Httplug exception. |
||
108 | * |
||
109 | * @param GuzzleExceptions\GuzzleException $exception |
||
110 | * @param RequestInterface $request |
||
111 | * |
||
112 | * @return HttplugException |
||
113 | */ |
||
114 | 10 | private function handleException(GuzzleExceptions\GuzzleException $exception, RequestInterface $request) |
|
140 | } |
||
141 |
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..