@@ -644,6 +644,9 @@ discard block |
||
644 | 644 | return $num; |
645 | 645 | } |
646 | 646 | |
647 | + /** |
|
648 | + * @param integer $size |
|
649 | + */ |
|
647 | 650 | private function unpackArrayData($size) |
648 | 651 | { |
649 | 652 | $array = []; |
@@ -654,6 +657,9 @@ discard block |
||
654 | 657 | return $array; |
655 | 658 | } |
656 | 659 | |
660 | + /** |
|
661 | + * @param integer $size |
|
662 | + */ |
|
657 | 663 | private function unpackMapData($size) |
658 | 664 | { |
659 | 665 | $map = []; |
@@ -713,6 +719,9 @@ discard block |
||
713 | 719 | throw UnpackingFailedException::invalidMapKeyType($c); |
714 | 720 | } |
715 | 721 | |
722 | + /** |
|
723 | + * @param integer $length |
|
724 | + */ |
|
716 | 725 | private function unpackExtData($length) |
717 | 726 | { |
718 | 727 | if (!isset($this->buffer[$this->offset + $length])) { // 1 (type) + length - 1 |
@@ -143,6 +143,9 @@ discard block |
||
143 | 143 | return $bool ? "\xc3" : "\xc2"; |
144 | 144 | } |
145 | 145 | |
146 | + /** |
|
147 | + * @param integer $int |
|
148 | + */ |
|
146 | 149 | public function packInt($int) |
147 | 150 | { |
148 | 151 | if ($int >= 0) { |
@@ -178,6 +181,9 @@ discard block |
||
178 | 181 | return \pack('CJ', 0xd3, $int); |
179 | 182 | } |
180 | 183 | |
184 | + /** |
|
185 | + * @param double $float |
|
186 | + */ |
|
181 | 187 | public function packFloat($float) |
182 | 188 | { |
183 | 189 | return $this->isForceFloat32 |
@@ -185,6 +191,9 @@ discard block |
||
185 | 191 | : "\xcb".\pack('E', $float); |
186 | 192 | } |
187 | 193 | |
194 | + /** |
|
195 | + * @param string $str |
|
196 | + */ |
|
188 | 197 | public function packStr($str) |
189 | 198 | { |
190 | 199 | $length = \strlen($str); |
@@ -202,6 +211,9 @@ discard block |
||
202 | 211 | return \pack('CN', 0xdb, $length).$str; |
203 | 212 | } |
204 | 213 | |
214 | + /** |
|
215 | + * @param string $str |
|
216 | + */ |
|
205 | 217 | public function packBin($str) |
206 | 218 | { |
207 | 219 | $length = \strlen($str); |
@@ -227,6 +239,9 @@ discard block |
||
227 | 239 | return $data; |
228 | 240 | } |
229 | 241 | |
242 | + /** |
|
243 | + * @param integer $size |
|
244 | + */ |
|
230 | 245 | public function packArrayHeader($size) |
231 | 246 | { |
232 | 247 | if ($size <= 0xf) { |
@@ -271,6 +286,9 @@ discard block |
||
271 | 286 | return $data; |
272 | 287 | } |
273 | 288 | |
289 | + /** |
|
290 | + * @param integer $size |
|
291 | + */ |
|
274 | 292 | public function packMapHeader($size) |
275 | 293 | { |
276 | 294 | if ($size <= 0xf) { |
@@ -283,6 +301,10 @@ discard block |
||
283 | 301 | return \pack('CN', 0xdf, $size); |
284 | 302 | } |
285 | 303 | |
304 | + /** |
|
305 | + * @param integer $type |
|
306 | + * @param string $data |
|
307 | + */ |
|
286 | 308 | public function packExt($type, $data) |
287 | 309 | { |
288 | 310 | $length = \strlen($data); |