Skip to content

Commit

Permalink
Merge pull request #4 from dimitribocquet/master
Browse files Browse the repository at this point in the history
Fix id longer than 63 bits
  • Loading branch information
hafael authored Sep 12, 2017
2 parents 14b8c36 + ca74619 commit 1202d1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaraFlake.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function generateID()
/**
* Concatenate the final ID
*/
$final_id = bindec($base) . bindec($shard_id) . bindec($random_part);
$final_id = bindec($base . $shard_id . $random_part);
/**
* Return unique 64bit ID
*/
Expand Down

0 comments on commit 1202d1d

Please sign in to comment.