| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 43 | 242 | public function promise() : PromiseInterface |
|
| 44 | { |
||
| 45 | 242 | if (null === $this->promise) { |
|
| 46 | 242 | $this->promise = new Promise(function ($resolve, $reject, $notify) { |
|
| 47 | 242 | $this->resolveCallback = $resolve; |
|
| 48 | 242 | $this->rejectCallback = $reject; |
|
| 49 | 242 | $this->notifyCallback = $notify; |
|
| 50 | 242 | }, $this->canceller); |
|
| 51 | } |
||
| 52 | |||
| 53 | 242 | return $this->promise; |
|
| 54 | } |
||
| 55 | |||
| 77 |