This commit is contained in:
Your Name
2021-07-26 19:46:18 +02:00
parent e7a49138bb
commit aae17f10a6
818 changed files with 70695 additions and 16408 deletions
+3 -7
View File
@@ -22,13 +22,12 @@ class Cursor
* this will return 0. That will effectively reset pagination, so the user gets the
* first slice.
*
* @param array $args
* @return int
* @param array<string, mixed> $args
*/
public static function decode(array $args): int
{
if ($cursor = Arr::get($args, 'after')) {
return (int) base64_decode($cursor);
return (int) \Safe\base64_decode($cursor);
}
return 0;
@@ -36,12 +35,9 @@ class Cursor
/**
* Encode the given offset to make the implementation opaque.
*
* @param int $offset
* @return string
*/
public static function encode(int $offset): string
{
return base64_encode($offset);
return base64_encode((string) $offset);
}
}