diff --git a/src/Observable/Internal/EmitQueue.php b/src/Observable/Internal/EmitQueue.php index c72ce42..aa68bd3 100644 --- a/src/Observable/Internal/EmitQueue.php +++ b/src/Observable/Internal/EmitQueue.php @@ -13,6 +13,9 @@ class EmitQueue { + /** + * @var bool + */ private $complete = false; /** @@ -26,10 +29,8 @@ class EmitQueue private $placeholder; /** - * @var \Icicle\Promise\PromiseInterface[] + * @param bool $backPressure */ - private $promises = []; - public function __construct($backPressure = true) { $this->backPressure = (bool) $backPressure; @@ -38,7 +39,7 @@ public function __construct($backPressure = true) } /** - * @param $value + * @param mixed $value * * @return \Generator */ @@ -71,7 +72,7 @@ public function pull() public function complete() { $this->complete = true; - $this->promises = []; + $this->placeholder = null; $this->deferred->resolve(); } @@ -83,7 +84,7 @@ public function complete() public function error(\Exception $exception) { $this->complete = true; - $this->promises = []; + $this->placeholder = null; $this->deferred->reject($exception); }