Completed
Push — master ( f9c4ed...88561b )
by Tomasz
04:15 queued 58s
created
src/Gendoria/CruftFlake/Generator/Generator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function generate()
118 118
     {
119
-        $t = (int) floor($this->timer->getUnixTimestamp() - $this->epoch);
119
+        $t = (int) floor($this->timer->getUnixTimestamp()-$this->epoch);
120 120
         if ($t !== $this->lastTime) {
121 121
             $this->generateWithDifferentTime($t);
122 122
         } else {
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
         if ($t < $this->lastTime) {
153 153
             throw new UnexpectedValueException(
154 154
             'Time moved backwards. We cannot generate IDs for '
155
-            . ($this->lastTime - $t) . ' milliseconds'
155
+            . ($this->lastTime-$t).' milliseconds'
156 156
             );
157 157
         } elseif ($t < 0) {
158 158
             throw new UnexpectedValueException(
159 159
             'Time is currently set before our epoch - unable '
160
-            . 'to generate IDs for ' . (-$t) . ' milliseconds'
160
+            . 'to generate IDs for '.(-$t).' milliseconds'
161 161
             );
162 162
         } elseif ($t > self::MAX_ADJUSTED_TIMESTAMP) {
163 163
             throw new OverflowException(
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     private function hexdec($hex)
222 222
     {
223 223
         $dec = 0;
224
-        for ($i = strlen($hex) - 1, $e = 1; $i >= 0; $i--, $e = bcmul($e, 16)) {
224
+        for ($i = strlen($hex)-1, $e = 1; $i >= 0; $i--, $e = bcmul($e, 16)) {
225 225
             $factor = self::$hexdec[$hex[$i]];
226 226
             $dec = bcadd($dec, bcmul($factor, $e));
227 227
         }
Please login to merge, or discard this patch.