emit($value); }; /** * Completes the observable with the given value. * * @param mixed $value */ $resolve = function ($value = null) { $this->resolve($value); }; /** * Fails the observable with the given exception. * * @param \Throwable $reason */ $fail = function (\Throwable $reason) { $this->fail($reason); }; $emitter($emit, $resolve, $fail); } }