public function returnValue() { if ($this->responseEvent instanceof ReturnedEvent) { return $this->responseEvent->value(); } throw new UndefinedResponseException('The call has not yet returned a value.'); }