Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions src/Buffertools/CachingTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class CachingTypeFactory extends TypeFactory
public function uint8(): Uint8
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint8(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -46,7 +46,7 @@ public function uint8(): Uint8
public function uint8le(): Uint8
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint8le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -59,7 +59,7 @@ public function uint8le(): Uint8
public function uint16(): Uint16
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint16(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -72,7 +72,7 @@ public function uint16(): Uint16
public function uint16le(): Uint16
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint16le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -85,7 +85,7 @@ public function uint16le(): Uint16
public function uint32(): Uint32
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint32(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -98,7 +98,7 @@ public function uint32(): Uint32
public function uint32le(): Uint32
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint32le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -111,7 +111,7 @@ public function uint32le(): Uint32
public function uint64(): Uint64
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint64(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -124,7 +124,7 @@ public function uint64(): Uint64
public function uint64le(): Uint64
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint64le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -137,7 +137,7 @@ public function uint64le(): Uint64
public function uint128(): Uint128
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint128(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -150,7 +150,7 @@ public function uint128(): Uint128
public function uint128le(): Uint128
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint128le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -163,7 +163,7 @@ public function uint128le(): Uint128
public function uint256(): Uint256
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint256(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -176,7 +176,7 @@ public function uint256(): Uint256
public function uint256le(): Uint256
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::uint256le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -189,7 +189,7 @@ public function uint256le(): Uint256
public function int8(): Int8
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int8(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -202,7 +202,7 @@ public function int8(): Int8
public function int8le(): Int8
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int8le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -215,7 +215,7 @@ public function int8le(): Int8
public function int16(): Int16
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int16(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -228,7 +228,7 @@ public function int16(): Int16
public function int16le(): Int16
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int16le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -241,7 +241,7 @@ public function int16le(): Int16
public function int32(): Int32
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int32(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -254,7 +254,7 @@ public function int32(): Int32
public function int32le(): Int32
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int32le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -267,7 +267,7 @@ public function int32le(): Int32
public function int64(): Int64
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int64(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -280,7 +280,7 @@ public function int64(): Int64
public function int64le(): Int64
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int64le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -293,7 +293,7 @@ public function int64le(): Int64
public function int128(): Int128
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int128(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -306,7 +306,7 @@ public function int128(): Int128
public function int128le(): Int128
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int128le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -319,7 +319,7 @@ public function int128le(): Int128
public function int256(): Int256
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int256(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -332,7 +332,7 @@ public function int256(): Int256
public function int256le(): Int256
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::int256le(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -345,7 +345,7 @@ public function int256le(): Int256
public function varint(): VarInt
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::varint(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -358,7 +358,7 @@ public function varint(): VarInt
public function varstring(): VarString
{
if (!isset($this->cache[__FUNCTION__])) {
$this->cache[__FUNCTION__] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__] = parent::varstring(...func_get_args());
}
return $this->cache[__FUNCTION__];
}
Expand All @@ -373,7 +373,7 @@ public function varstring(): VarString
public function bytestring(int $length): ByteString
{
if (!isset($this->cache[__FUNCTION__ . $length])) {
$this->cache[__FUNCTION__ . $length] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__ . $length] = parent::bytestring(...func_get_args());
}
return $this->cache[__FUNCTION__ . $length];
}
Expand All @@ -388,7 +388,7 @@ public function bytestring(int $length): ByteString
public function bytestringle(int $length): ByteString
{
if (!isset($this->cache[__FUNCTION__ . $length])) {
$this->cache[__FUNCTION__ . $length] = call_user_func_array(['parent', __FUNCTION__], func_get_args());
$this->cache[__FUNCTION__ . $length] = parent::bytestringle(...func_get_args());
}
return $this->cache[__FUNCTION__ . $length];
}
Expand Down