Skip to content

Commit

Permalink
Merge pull request #1110 from abraham/random_int
Browse files Browse the repository at this point in the history
Set min/max on random_int
  • Loading branch information
abraham committed Aug 18, 2022
2 parents 17ea3a7 + fe315db commit b930259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Request.php
Expand Up @@ -282,6 +282,6 @@ public function buildSignature(
*/
public static function generateNonce(): string
{
return md5(microtime() . random_int());
return md5(microtime() . random_int(PHP_INT_MIN, PHP_INT_MAX));
}
}
2 changes: 1 addition & 1 deletion tests/mocks.php
Expand Up @@ -15,7 +15,7 @@ function microtime()
return 'FAKE_MICROTIME';
}

function random_int()
function random_int($_min, $_max)
{
return 123_456_789;
}

0 comments on commit b930259

Please sign in to comment.