Skip to content

Commit a6ae833

Browse files
committed
fix: add generics to through method
1 parent b8526f4 commit a6ae833

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

stubs/common/Pagination.stub

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ abstract class AbstractPaginator implements \Illuminate\Contracts\Support\Htmlab
1515
* @return TValue|null
1616
*/
1717
public function offsetGet($key): mixed;
18+
19+
/**
20+
* Transform each item in the slice of items using a callback.
21+
*
22+
* @template TMapValue
23+
*
24+
* @param callable(TValue, TKey): TMapValue $callback
25+
* @return $this
26+
*
27+
* @phpstan-this-out static<TKey, TMapValue>
28+
*/
29+
public function through(callable $callback);
1830
}
1931

2032
/**
@@ -71,6 +83,18 @@ abstract class AbstractCursorPaginator implements \Illuminate\Contracts\Support\
7183
* @return TValue|null
7284
*/
7385
public function offsetGet($key): mixed;
86+
87+
/**
88+
* Transform each item in the slice of items using a callback.
89+
*
90+
* @template TMapValue
91+
*
92+
* @param callable(TValue, TKey): TMapValue $callback
93+
* @return $this
94+
*
95+
* @phpstan-this-out static<TKey, TMapValue>
96+
*/
97+
public function through(callable $callback);
7498
}
7599

76100
/**

0 commit comments

Comments
 (0)