Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class Request |
||
11 | { |
||
12 | private $deferred; |
||
13 | |||
14 | private $command; |
||
15 | |||
16 | public function __construct(string $command) |
||
17 | { |
||
18 | $this->deferred = new Deferred(); |
||
19 | $this->command = $command; |
||
20 | } |
||
21 | |||
22 | public function command(): string |
||
23 | { |
||
24 | return $this->command; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return Promise|PromiseInterface |
||
29 | */ |
||
30 | public function promise() |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param mixed $value |
||
37 | */ |
||
38 | public function resolve($value): void |
||
39 | { |
||
40 | $this->deferred->resolve($value); |
||
41 | } |
||
42 | |||
43 | public function reject(Exception $exception): void |
||
46 | } |
||
47 | } |
||
48 |