Fixes static analysis
This commit is contained in:
@@ -86,7 +86,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
* @param string $binaryData
|
||||
* @param int $dataLength
|
||||
*/
|
||||
public function __construct(protected string $binaryData, protected int $dataLength = 0)
|
||||
final public function __construct(protected string $binaryData, protected int $dataLength = 0)
|
||||
{
|
||||
$this->dataLength = strlen($binaryData);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
* Returns the value of a single unsigned 16-bit integer.
|
||||
*
|
||||
* @param int $offset
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public function getUint16Val(int $offset = 0): int
|
||||
{
|
||||
@@ -209,7 +209,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
* Returns the value of a single unsigned 32-bit integer.
|
||||
*
|
||||
* @param int $offset
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public function getUint32Val(int $offset = 0): int
|
||||
{
|
||||
@@ -404,7 +404,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
throw new InvalidArgumentException('ByteBuffer: Invalid base64 url string');
|
||||
}
|
||||
|
||||
return new ByteBuffer($bin);
|
||||
return new static($bin);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -419,7 +419,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
throw new InvalidArgumentException('ByteBuffer: Invalid base64 string');
|
||||
}
|
||||
|
||||
return new ByteBuffer($bin);
|
||||
return new static($bin);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user