Skip to content

Commit 22ac3f1

Browse files
committed
BinaryStream: add PHPStan type hint for get() parameter
1 parent fe68d3d commit 22ac3f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/BinaryStream.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ public function getBuffer() : string{
6565
/**
6666
* @phpstan-impure
6767
* @throws BinaryDataException if there are not enough bytes left in the buffer
68+
*
69+
* @phpstan-param int<0, max> $len
6870
*/
6971
public function get(int $len) : string{
7072
if($len === 0){

0 commit comments

Comments
 (0)