Passed
Pull Request — master (#1136)
by rugk
09:20
created
lib/Vizhash16x16.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         // We convert the hash into an array of integers.
89 89
         $this->VALUES = array();
90
-        for ($i = 0; $i < $textlen; $i = $i + 2) {
90
+        for ($i = 0; $i < $textlen; $i = $i+2) {
91 91
             array_push($this->VALUES, hexdec(substr($text, $i, 2)));
92 92
         }
93 93
         $this->VALUES_INDEX = 0; // to walk the array.
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
         for ($i = 0; $i < 7; ++$i) {
110 110
             $action = $this->getInt();
111 111
             $color  = imagecolorallocate($image, $r, $g, $b);
112
-            $r      = $r0      = ($r0 + $this->getInt() / 25) % 256;
113
-            $g      = $g0      = ($g0 + $this->getInt() / 25) % 256;
114
-            $b      = $b0      = ($b0 + $this->getInt() / 25) % 256;
112
+            $r      = $r0      = ($r0+$this->getInt() / 25) % 256;
113
+            $g      = $g0      = ($g0+$this->getInt() / 25) % 256;
114
+            $b      = $b0      = ($b0+$this->getInt() / 25) % 256;
115 115
             $this->drawshape($image, $action, $color);
116 116
         }
117 117
 
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
             $sizeinv = imagesx($img);
186 186
         }
187 187
         $diffs = array(
188
-            ($color2[0] - $color1[0]) / $size,
189
-            ($color2[1] - $color1[1]) / $size,
190
-            ($color2[2] - $color1[2]) / $size,
188
+            ($color2[0]-$color1[0]) / $size,
189
+            ($color2[1]-$color1[1]) / $size,
190
+            ($color2[2]-$color1[2]) / $size,
191 191
         );
192 192
         for ($i = 0; $i < $size; ++$i) {
193
-            $r = $color1[0] + ($diffs[0] * $i);
194
-            $g = $color1[1] + ($diffs[1] * $i);
195
-            $b = $color1[2] + ($diffs[2] * $i);
193
+            $r = $color1[0]+($diffs[0] * $i);
194
+            $g = $color1[1]+($diffs[1] * $i);
195
+            $b = $color1[2]+($diffs[2] * $i);
196 196
             if ($direction == 'h') {
197 197
                 imageline($img, $i, 0, $i, $sizeinv, imagecolorallocate($img, $r, $g, $b));
198 198
             } else {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 break;
227 227
             default:
228 228
                 $start = $this->getInt() * 360 / 256;
229
-                $end   = $start + $this->getInt() * 180 / 256;
229
+                $end   = $start+$this->getInt() * 180 / 256;
230 230
                 imagefilledarc($image, $this->getX(), $this->getY(), $this->getX(), $this->getY(), $start, $end, $color, IMG_ARC_PIE);
231 231
         }
232 232
     }
Please login to merge, or discard this patch.