change how ids are generated
from uniquid to hex of random bytes
This commit is contained in:
parent
50fcdcaa28
commit
e79064d909
1 changed files with 2 additions and 2 deletions
|
|
@ -45,9 +45,9 @@ class FakeBidRepository implements BidRepository
|
||||||
|
|
||||||
private function getUniqueId(): string
|
private function getUniqueId(): string
|
||||||
{
|
{
|
||||||
$id = uniqid('', true);
|
$id = bin2hex(random_bytes(10));
|
||||||
while ($this->find($id) !== null) {
|
while ($this->find($id) !== null) {
|
||||||
$id = uniqid('', true);
|
$id = bin2hex(random_bytes(10));
|
||||||
}
|
}
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue