@@ -102,7 +102,7 @@ |
||
| 102 | 102 | for ($i = 0; $i < 1024, $machineId === null; ++$i) { |
| 103 | 103 | $machineNode = $this->machineToNode($i); |
| 104 | 104 | if (in_array($machineNode, $children)) { |
| 105 | - continue; // already used |
|
| 105 | + continue; // already used |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // attempt to claim |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function generate() |
| 116 | 116 | { |
| 117 | - $t = (int)floor($this->timer->getUnixTimestamp() - $this->epoch); |
|
| 117 | + $t = (int) floor($this->timer->getUnixTimestamp()-$this->epoch); |
|
| 118 | 118 | if ($t !== $this->lastTime) { |
| 119 | 119 | if ($t < $this->lastTime) { |
| 120 | 120 | throw new UnexpectedValueException( |
| 121 | 121 | 'Time moved backwards. We cannot generate IDs for ' |
| 122 | - .($this->lastTime - $t).' milliseconds' |
|
| 122 | + .($this->lastTime-$t).' milliseconds' |
|
| 123 | 123 | ); |
| 124 | 124 | } elseif ($t < 0) { |
| 125 | 125 | throw new UnexpectedValueException( |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | private function hexdec($hex) |
| 187 | 187 | { |
| 188 | 188 | $dec = 0; |
| 189 | - for ($i = strlen($hex) - 1, $e = 1; $i >= 0; $i--, $e = bcmul($e, 16)) { |
|
| 189 | + for ($i = strlen($hex)-1, $e = 1; $i >= 0; $i--, $e = bcmul($e, 16)) { |
|
| 190 | 190 | $factor = self::$hexdec[$hex[$i]]; |
| 191 | 191 | $dec = bcadd($dec, bcmul($factor, $e)); |
| 192 | 192 | } |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function getUnixTimestamp() |
| 20 | 20 | { |
| 21 | - return (int)floor(microtime(true) * 1000); |
|
| 21 | + return (int) floor(microtime(true) * 1000); |
|
| 22 | 22 | } |
| 23 | 23 | } |