File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -287,8 +287,12 @@ public function collect(string|int|null $key = null): Collection
287287
288288 /**
289289 * Cast the response to a DTO.
290+ *
291+ * @template T of object
292+ * @param class-string<T>|null $dto
293+ * @return T
290294 */
291- public function dto (): mixed
295+ public function dto (? string $ dto = null ): mixed
292296 {
293297 $ request = $ this ->pendingRequest ->getRequest ();
294298 $ connector = $ this ->pendingRequest ->getConnector ();
@@ -304,8 +308,12 @@ public function dto(): mixed
304308
305309 /**
306310 * Convert the response into a DTO or throw a LogicException if the response failed
311+ *
312+ * @template T of object
313+ * @param class-string<T>|null $dto
314+ * @return T
307315 */
308- public function dtoOrFail (): mixed
316+ public function dtoOrFail (? string $ dto = null ): mixed
309317 {
310318 if ($ this ->failed ()) {
311319 throw new LogicException ('Unable to create data transfer object as the response has failed. ' , 0 , $ this ->toException ());
You can’t perform that action at this time.
0 commit comments