Skip to content

Commit

Permalink
Merge pull request #6298 from fabacino/bugfix/example-throws-deprecat…
Browse files Browse the repository at this point in the history
…ed-warning-php81

Fix E_DEPRECATED warnings in Example class on PHP 8.1
  • Loading branch information
Naktibalda committed Dec 21, 2021
2 parents e410e77 + 56d8e48 commit d3656d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Codeception/Example.php
Expand Up @@ -12,6 +12,7 @@ public function __construct($data)
$this->data = $data;
}

#[\ReturnTypeWillChange]
/**
* Whether a offset exists
* @link http://php.net/manual/en/arrayaccess.offsetexists.php
Expand All @@ -29,6 +30,7 @@ public function offsetExists($offset)
return array_key_exists($offset, $this->data);
}

#[\ReturnTypeWillChange]
/**
* Offset to retrieve
* @link http://php.net/manual/en/arrayaccess.offsetget.php
Expand All @@ -46,6 +48,7 @@ public function offsetGet($offset)
return $this->data[$offset];
}

#[\ReturnTypeWillChange]
/**
* Offset to set
* @link http://php.net/manual/en/arrayaccess.offsetset.php
Expand All @@ -63,6 +66,7 @@ public function offsetSet($offset, $value)
$this->data[$offset] = $value;
}

#[\ReturnTypeWillChange]
/**
* Offset to unset
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
Expand All @@ -77,6 +81,7 @@ public function offsetUnset($offset)
unset($this->data[$offset]);
}

#[\ReturnTypeWillChange]
/**
* Count elements of an object
* @link http://php.net/manual/en/countable.count.php
Expand All @@ -91,6 +96,7 @@ public function count()
return count($this->data);
}

#[\ReturnTypeWillChange]
/**
* Retrieve an external iterator
* @link http://php.net/manual/en/iteratoraggregate.getiterator.php
Expand Down

0 comments on commit d3656d1

Please sign in to comment.