Completed
Push — master ( 88561b...fe9dfb )
by Tomasz
02:50
created
src/Gendoria/CruftFlake/Config/ConfigInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Cruft flake config interface.
4
- * 
5
- * Implement this if you want some other way to configure machines.
6
- * 
7
- * @author @davegardnerisme
8
- */
3
+     * Cruft flake config interface.
4
+     * 
5
+     * Implement this if you want some other way to configure machines.
6
+     * 
7
+     * @author @davegardnerisme
8
+     */
9 9
 
10 10
 namespace Gendoria\CruftFlake\Config;
11 11
 
Please login to merge, or discard this patch.
src/Gendoria/CruftFlake/Config/FixedConfig.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Fixed configuration.
4
- * 
5
- * This is designed to be used where each machine **knows** what its machine
6
- * ID is - eg: via some kind of automatically deployed configuration
7
- * (puppet etc.)
8
- * 
9
- * @author @davegardnerisme
10
- */
3
+     * Fixed configuration.
4
+     * 
5
+     * This is designed to be used where each machine **knows** what its machine
6
+     * ID is - eg: via some kind of automatically deployed configuration
7
+     * (puppet etc.)
8
+     * 
9
+     * @author @davegardnerisme
10
+     */
11 11
 
12 12
 namespace Gendoria\CruftFlake\Config;
13 13
 
Please login to merge, or discard this patch.
src/Gendoria/CruftFlake/Timer/Timer.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Cruft flake timer.
4
- * 
5
- * @author @davegardnerisme
6
- */
3
+     * Cruft flake timer.
4
+     * 
5
+     * @author @davegardnerisme
6
+     */
7 7
 
8 8
 namespace Gendoria\CruftFlake\Timer;
9 9
 
Please login to merge, or discard this patch.
src/Gendoria/CruftFlake/Timer/TimerInterface.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Cruft flake timer interface.
4
- * 
5
- * Implement this if you want some other way to provide time.
6
- * 
7
- * @author @davegardnerisme
8
- */
3
+     * Cruft flake timer interface.
4
+     * 
5
+     * Implement this if you want some other way to provide time.
6
+     * 
7
+     * @author @davegardnerisme
8
+     */
9 9
 
10 10
 namespace Gendoria\CruftFlake\Timer;
11 11
 
Please login to merge, or discard this patch.
src/Gendoria/CruftFlake/Zmq/ZmqServer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * Constructor.
44 44
      * 
45 45
      * @param @inject Generator $generator
46
-     * @param string            $port      Which TCP port to list on, default 5599
46
+     * @param integer            $port      Which TCP port to list on, default 5599
47 47
      * @param bool              $debugMode Debug mode. If set to true, server will only listen for one command, before exiting.
48 48
      */
49 49
     public function __construct(Generator $generator, $port = 5599, $debugMode = false)
Please login to merge, or discard this patch.
src/Gendoria/CruftFlake/Generator/Generator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function generate()
117 117
     {
118
-        $t = (int) floor($this->timer->getUnixTimestamp() - $this->epoch);
118
+        $t = (int) floor($this->timer->getUnixTimestamp()-$this->epoch);
119 119
         if ($t !== $this->lastTime) {
120 120
             $this->generateWithDifferentTime($t);
121 121
         } else {
@@ -152,7 +152,7 @@  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(
@@ -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.