Skip to content

Commit

Permalink
[11.x] add Generics to Paginator's array access methods (#54428)
Browse files Browse the repository at this point in the history
  • Loading branch information
taka-oyama authored Jan 31, 2025
1 parent 8f0a82e commit fcd058f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/Illuminate/Pagination/AbstractCursorPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ public function getOptions()
/**
* Determine if the given item exists.
*
* @param mixed $key
* @param TKey $key
* @return bool
*/
public function offsetExists($key): bool
Expand All @@ -612,8 +612,8 @@ public function offsetExists($key): bool
/**
* Get the item at the given offset.
*
* @param mixed $key
* @return mixed
* @param TKey $key
* @return TValue
*/
public function offsetGet($key): mixed
{
Expand All @@ -623,8 +623,8 @@ public function offsetGet($key): mixed
/**
* Set the item at the given offset.
*
* @param mixed $key
* @param mixed $value
* @param TKey|null $key
* @param TValue $value
* @return void
*/
public function offsetSet($key, $value): void
Expand All @@ -635,7 +635,7 @@ public function offsetSet($key, $value): void
/**
* Unset the item at the given key.
*
* @param mixed $key
* @param TKey $key
* @return void
*/
public function offsetUnset($key): void
Expand Down
12 changes: 6 additions & 6 deletions src/Illuminate/Pagination/AbstractPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ public function getOptions()
/**
* Determine if the given item exists.
*
* @param mixed $key
* @param TKey $key
* @return bool
*/
public function offsetExists($key): bool
Expand All @@ -737,8 +737,8 @@ public function offsetExists($key): bool
/**
* Get the item at the given offset.
*
* @param mixed $key
* @return mixed
* @param TKey $key
* @return TValue
*/
public function offsetGet($key): mixed
{
Expand All @@ -748,8 +748,8 @@ public function offsetGet($key): mixed
/**
* Set the item at the given offset.
*
* @param mixed $key
* @param mixed $value
* @param TKey|null $key
* @param TValue $value
* @return void
*/
public function offsetSet($key, $value): void
Expand All @@ -760,7 +760,7 @@ public function offsetSet($key, $value): void
/**
* Unset the item at the given key.
*
* @param mixed $key
* @param TKey $key
* @return void
*/
public function offsetUnset($key): void
Expand Down

0 comments on commit fcd058f

Please sign in to comment.