Skip to content

Not all return types in comments seem correct in BinaryReader.php #17

@Matthijs-Wessels

Description

@Matthijs-Wessels

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).

/**
* @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.

/**
* @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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions