/** * Checks if the operation was completed. * * @return boolean */ public function isOperationComplete() { return !$this->isOperationAsync() || $this->hasPromise() && PromiseInterface::PENDING !== $this->promise->getState(); }