Fixes static analysis

This commit is contained in:
Italo
2022-07-27 14:22:05 -04:00
committed by GitHub
parent 21db20d103
commit 8277b1dd36
15 changed files with 33 additions and 15 deletions

View File

@@ -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);
}
/**