Skip to content

Commit

Permalink
Replace more tabs used for indentation by spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jecknig committed Jun 23, 2016
1 parent 7bff993 commit dde2543
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Converter/Number/BigNumberConverter.php
Expand Up @@ -43,7 +43,7 @@ public function fromHex($hex)
*/
public function toHex($integer)
{
$number = gmp_init($integer);
$number = gmp_init($integer);

return gmp_strval($number, 16);
}
Expand Down
18 changes: 9 additions & 9 deletions src/DegradedUuid.php
Expand Up @@ -32,16 +32,16 @@ public function getDateTime()

$time = $this->converter->fromHex($this->getTimestampHex());

$ts = gmp_init($time);
$ts = gmp_sub($ts, gmp_init('122192928000000000'));
$d = gmp_init('10000000');
list($q, $r) = gmp_div_qr($ts, $d);
$ts = gmp_init($time);
$ts = gmp_sub($ts, gmp_init('122192928000000000'));
$d = gmp_init('10000000');
list($q, $r) = gmp_div_qr($ts, $d);

//If $r >= $d/2, we have to round up
$sign = gmp_sign(gmp_sub($d, gmp_add($r, $r)));
if ($sign <= 0) {
$q = gmp_add($q, gmp_init(1));
}
//If $r >= $d/2, we have to round up
$sign = gmp_sign(gmp_sub($d, gmp_add($r, $r)));
if ($sign <= 0) {
$q = gmp_add($q, gmp_init(1));
}

$unixTime = gmp_strval($q);

Expand Down

0 comments on commit dde2543

Please sign in to comment.