Completed
Push — master ( 968cc5...a69343 )
by Michael
02:42
created
src/Huffman.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     /**
136 136
      * Unpack dictionary
137 137
      *
138
-     * @param $data
138
+     * @param string $data
139 139
      * @return array
140 140
      */
141 141
     private static function unpackDictionary($data)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * 101
164 164
      * 111
165 165
      *
166
-     * @param $count
166
+     * @param integer $count
167 167
      * @return array
168 168
      */
169 169
     private static function createBinaryIndexes($count)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
             $pos = array_search(base64_encode($d), array_keys($dictionary));
48 48
 
49 49
             // Append the binary to the running string
50
-            $binaryString = $binaryString . $indexMap[$pos];
50
+            $binaryString = $binaryString.$indexMap[$pos];
51 51
         }
52 52
 
53 53
         // Pad the string to the byte boundry
54 54
         while (strlen($binaryString) % 8 !== 0) {
55
-            $binaryString = $binaryString . '0';
55
+            $binaryString = $binaryString.'0';
56 56
         }
57 57
 
58 58
         // Chunk data into bytes
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
 
67 67
         // Return compressed data with packed dictionary
68
-        return self::packDictionary($dictionary) . implode($chunks);
68
+        return self::packDictionary($dictionary).implode($chunks);
69 69
     }
70 70
 
71 71
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $dictionary = array_keys($dictionary);
127 127
 
128 128
         foreach ($dictionary as $idx => $char) {
129
-            $out = $out . chr(bindec($indexMap[$idx])) . base64_decode($char);
129
+            $out = $out.chr(bindec($indexMap[$idx])).base64_decode($char);
130 130
         }
131 131
 
132 132
         return $out;
Please login to merge, or discard this patch.