@@ -62,14 +62,14 @@ class Factory
6262 /**
6363 * The recorded response array.
6464 *
65- * @var array
65+ * @var list< array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
6666 */
6767 protected $ recorded = [];
6868
6969 /**
7070 * All created response sequences.
7171 *
72- * @var array
72+ * @var list<\Illuminate\Http\Client\ResponseSequence>
7373 */
7474 protected $ responseSequences = [];
7575
@@ -195,7 +195,7 @@ public static function failedRequest($body = null, $status = 200, $headers = [])
195195 * Create a new connection exception for use during stubbing.
196196 *
197197 * @param string|null $message
198- * @return \GuzzleHttp\Promise\PromiseInterface
198+ * @return \Closure(\Illuminate\Http\Client\Request): \ GuzzleHttp\Promise\PromiseInterface
199199 */
200200 public static function failedConnection ($ message = null )
201201 {
@@ -221,7 +221,7 @@ public function sequence(array $responses = [])
221221 /**
222222 * Register a stub callable that will intercept requests and be able to return stub responses.
223223 *
224- * @param callable|array|null $callback
224+ * @param callable|array<string, mixed> |null $callback
225225 * @return $this
226226 */
227227 public function fake ($ callback = null )
@@ -283,7 +283,7 @@ public function fakeSequence($url = '*')
283283 * Stub the given URL using the given callback.
284284 *
285285 * @param string $url
286- * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array $callback
286+ * @param \Illuminate\Http\Client\Response|\GuzzleHttp\Promise\PromiseInterface|callable|int|string|array|\Illuminate\Http\Client\ResponseSequence $callback
287287 * @return $this
288288 */
289289 public function stubUrl ($ url , $ callback )
@@ -371,7 +371,7 @@ public function recordRequestResponsePair($request, $response)
371371 /**
372372 * Assert that a request / response pair was recorded matching a given truth test.
373373 *
374- * @param callable $callback
374+ * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
375375 * @return void
376376 */
377377 public function assertSent ($ callback )
@@ -385,7 +385,7 @@ public function assertSent($callback)
385385 /**
386386 * Assert that the given request was sent in the given order.
387387 *
388- * @param array $callbacks
388+ * @param list<string|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)|callable> $callbacks
389389 * @return void
390390 */
391391 public function assertSentInOrder ($ callbacks )
@@ -407,7 +407,7 @@ public function assertSentInOrder($callbacks)
407407 /**
408408 * Assert that a request / response pair was not recorded matching a given truth test.
409409 *
410- * @param callable $callback
410+ * @param callable|(\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool) $callback
411411 * @return void
412412 */
413413 public function assertNotSent ($ callback )
@@ -460,8 +460,8 @@ public function assertSequencesAreEmpty()
460460 /**
461461 * Get a collection of the request / response pairs matching the given truth test.
462462 *
463- * @param callable $callback
464- * @return \Illuminate\Support\Collection
463+ * @param (\Closure(\Illuminate\Http\Client\Request, \Illuminate\Http\Client\Response|null): bool)| callable $callback
464+ * @return \Illuminate\Support\Collection<int, array{0: \Illuminate\Http\Client\Request, 1: \Illuminate\Http\Client\Response|null}>
465465 */
466466 public function recorded ($ callback = null )
467467 {
0 commit comments