@@ -63,6 +63,9 @@ public function __construct(
6363 $ this ->switchByteOrder = $ this ->isPlatformLittleEndian ();
6464 }
6565
66+ /**
67+ * @return array<mixed>
68+ */
6669 public function decode (int $ offset ): array
6770 {
6871 $ ctrlByte = \ord (Util::read ($ this ->fileStream , $ offset , 1 ));
@@ -110,6 +113,8 @@ public function decode(int $offset): array
110113
111114 /**
112115 * @param int<0, max> $size
116+ *
117+ * @return array{0:mixed, 1:int}
113118 */
114119 private function decodeByType (int $ type , int $ offset , int $ size ): array
115120 {
@@ -167,6 +172,9 @@ private function verifySize(int $expected, int $actual): void
167172 }
168173 }
169174
175+ /**
176+ * @return array{0:array<mixed>, 1:int}
177+ */
170178 private function decodeArray (int $ size , int $ offset ): array
171179 {
172180 $ array = [];
@@ -247,6 +255,9 @@ private function decodeInt32(string $bytes, int $size): int
247255 return $ int ;
248256 }
249257
258+ /**
259+ * @return array{0:array<string, mixed>, 1:int}
260+ */
250261 private function decodeMap (int $ size , int $ offset ): array
251262 {
252263 $ map = [];
@@ -260,6 +271,9 @@ private function decodeMap(int $size, int $offset): array
260271 return [$ map , $ offset ];
261272 }
262273
274+ /**
275+ * @return array{0:int, 1:int}
276+ */
263277 private function decodePointer (int $ ctrlByte , int $ offset ): array
264278 {
265279 $ pointerSize = (($ ctrlByte >> 3 ) & 0x3 ) + 1 ;
@@ -378,6 +392,9 @@ private function decodeUint(string $bytes, int $byteLength)
378392 return $ integerAsString ;
379393 }
380394
395+ /**
396+ * @return array{0:int, 1:int}
397+ */
381398 private function sizeFromCtrlByte (int $ ctrlByte , int $ offset ): array
382399 {
383400 $ size = $ ctrlByte & 0x1F ;
0 commit comments