-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Most of the functions specify return type int. While I believe the ones reading from $this->byteReader are returning string. $this->byteReader->read uses fread which returns a string (as mentioned in the comments for $this->byteReader->read).
php-binary-reader/src/BinaryReader.php
Lines 166 to 173 in 8901cbf
| /** | |
| * @param int $count | |
| * @return int | |
| */ | |
| public function readBytes($count) | |
| { | |
| return $this->byteReader->read($this, $count); | |
| } |
Conversely, getUInt16 has return type string in the comments. This should probably be int.
php-binary-reader/src/BinaryReader.php
Lines 191 to 205 in 8901cbf
| /** | |
| * @return int | |
| */ | |
| public function readInt16() | |
| { | |
| return $this->int16Reader->readSigned($this); | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function readUInt16() | |
| { | |
| return $this->int16Reader->read($this); | |
| } |
I think some other functions have similar problems.
Metadata
Metadata
Assignees
Labels
No labels