Skip to content

Commit

Permalink
use Uuid::getHex to retrieve hexa notation
Browse files Browse the repository at this point in the history
  • Loading branch information
lunika authored and Vinceveve committed Aug 10, 2017
1 parent 94036a1 commit 380ec53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Rxnet/EventStore/NewEvent/JsonEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public function setMetaData($meta)
public function setId($id)
{
if(!$id) {
$id = Uuid::uuid4()->toString();
$id = Uuid::uuid4()->getHex();
}
elseif (!Uuid::isValid($id)) {
$id = Uuid::uuid3(Uuid::NAMESPACE_OID, $id)->toString();
$id = Uuid::uuid3(Uuid::NAMESPACE_OID, $id)->getHex();
}
$id = hex2bin(str_replace('-', '', $id));
$id = hex2bin($id);
$this->message->setEventId($id);
}

Expand Down

0 comments on commit 380ec53

Please sign in to comment.