Skip to content

Commit

Permalink
Fix return types for PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Aug 4, 2021
1 parent 391d6d0 commit 7f65c44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Cloner/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function getValue($recursive = false)
/**
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return \count($this->getValue());
Expand All @@ -119,6 +120,7 @@ public function count()
/**
* @return \Traversable
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
if (!\is_array($value = $this->getValue())) {
Expand Down Expand Up @@ -150,6 +152,7 @@ public function __isset($key)
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($key)
{
return $this->__isset($key);
Expand All @@ -158,6 +161,7 @@ public function offsetExists($key)
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->__get($key);
Expand All @@ -166,6 +170,7 @@ public function offsetGet($key)
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($key, $value)
{
throw new \BadMethodCallException(self::class.' objects are immutable.');
Expand All @@ -174,6 +179,7 @@ public function offsetSet($key, $value)
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($key)
{
throw new \BadMethodCallException(self::class.' objects are immutable.');
Expand Down

0 comments on commit 7f65c44

Please sign in to comment.