@@ -40,14 +40,15 @@ public function __construct(string $buffer = '')
4040 $ this ->size = \strlen ($ this ->data );
4141
4242 if (!isset (self ::$ isLittleEndian )) {
43- self ::$ isLittleEndian = \unpack ("S " , "\x01\x00" )[1 ] === 1 ;
43+ self ::$ isLittleEndian = \unpack ("S " , "\x01\x00" )[1 ] === 1 ;
4444 }
4545 }
4646
4747 /**
4848 * @param string|static $value
4949 *
5050 * @return static
51+ * @throws \TypeError
5152 */
5253 public function append ($ value ): self
5354 {
@@ -220,6 +221,7 @@ public function appendInt8(int $value): self
220221 * @param int $offset
221222 *
222223 * @return int
224+ * @throws BufferOverflow
223225 */
224226 public function readInt8 (int $ offset = 0 ): int
225227 {
@@ -228,6 +230,7 @@ public function readInt8(int $offset = 0): int
228230
229231 /**
230232 * @return int
233+ * @throws BufferOverflow
231234 */
232235 public function consumeInt8 (): int
233236 {
@@ -248,6 +251,7 @@ public function appendInt16(int $value): self
248251 * @param int $offset
249252 *
250253 * @return int
254+ * @throws BufferOverflow
251255 */
252256 public function readInt16 (int $ offset = 0 ): int
253257 {
@@ -256,6 +260,7 @@ public function readInt16(int $offset = 0): int
256260
257261 /**
258262 * @return int
263+ * @throws BufferOverflow
259264 */
260265 public function consumeInt16 (): int
261266 {
@@ -276,6 +281,7 @@ public function appendInt32(int $value): self
276281 * @param int $offset
277282 *
278283 * @return int
284+ * @throws BufferOverflow
279285 */
280286 public function readInt32 (int $ offset = 0 ): int
281287 {
@@ -284,6 +290,7 @@ public function readInt32(int $offset = 0): int
284290
285291 /**
286292 * @return int
293+ * @throws BufferOverflow
287294 */
288295 public function consumeInt32 (): int
289296 {
@@ -304,6 +311,7 @@ public function appendInt64(int $value): self
304311 * @param int $offset
305312 *
306313 * @return int
314+ * @throws BufferOverflow
307315 */
308316 public function readInt64 (int $ offset = 0 ): int
309317 {
@@ -312,6 +320,7 @@ public function readInt64(int $offset = 0): int
312320
313321 /**
314322 * @return int
323+ * @throws BufferOverflow
315324 */
316325 public function consumeInt64 (): int
317326 {
@@ -332,6 +341,7 @@ public function appendUint8(int $value): self
332341 * @param int $offset
333342 *
334343 * @return int
344+ * @throws BufferOverflow
335345 */
336346 public function readUint8 (int $ offset = 0 ): int
337347 {
@@ -340,6 +350,7 @@ public function readUint8(int $offset = 0): int
340350
341351 /**
342352 * @return int
353+ * @throws BufferOverflow
343354 */
344355 public function consumeUint8 (): int
345356 {
@@ -364,6 +375,7 @@ public function appendUint16(int $value): self
364375 * @param int $offset
365376 *
366377 * @return int
378+ * @throws BufferOverflow
367379 */
368380 public function readUint16 (int $ offset = 0 ): int
369381 {
@@ -372,6 +384,7 @@ public function readUint16(int $offset = 0): int
372384
373385 /**
374386 * @return int
387+ * @throws BufferOverflow
375388 */
376389 public function consumeUint16 (): int
377390 {
@@ -396,6 +409,7 @@ public function appendUint32(int $value): self
396409 * @param int $offset
397410 *
398411 * @return int
412+ * @throws BufferOverflow
399413 */
400414 public function readUint32 (int $ offset = 0 ): int
401415 {
@@ -404,6 +418,7 @@ public function readUint32(int $offset = 0): int
404418
405419 /**
406420 * @return int
421+ * @throws BufferOverflow
407422 */
408423 public function consumeUint32 (): int
409424 {
@@ -428,6 +443,7 @@ public function appendUint64(int $value): self
428443 * @param int $offset
429444 *
430445 * @return int
446+ * @throws BufferOverflow
431447 */
432448 public function readUint64 (int $ offset = 0 ): int
433449 {
@@ -436,6 +452,7 @@ public function readUint64(int $offset = 0): int
436452
437453 /**
438454 * @return int
455+ * @throws BufferOverflow
439456 */
440457 public function consumeUint64 (): int
441458 {
@@ -456,6 +473,7 @@ public function appendFloat(float $value): self
456473 * @param int $offset
457474 *
458475 * @return float
476+ * @throws BufferOverflow
459477 */
460478 public function readFloat (int $ offset = 0 ): float
461479 {
@@ -464,6 +482,7 @@ public function readFloat(int $offset = 0): float
464482
465483 /**
466484 * @return float
485+ * @throws BufferOverflow
467486 */
468487 public function consumeFloat (): float
469488 {
@@ -484,6 +503,7 @@ public function appendDouble($value): self
484503 * @param int $offset
485504 *
486505 * @return float
506+ * @throws BufferOverflow
487507 */
488508 public function readDouble (int $ offset = 0 ): float
489509 {
@@ -492,6 +512,7 @@ public function readDouble(int $offset = 0): float
492512
493513 /**
494514 * @return float
515+ * @throws BufferOverflow
495516 */
496517 public function consumeDouble (): float
497518 {
0 commit comments