Skip to content

Commit

Permalink
Issue backdrop-contrib#14. Add #[\ReturnTypeWillChange] to methods th…
Browse files Browse the repository at this point in the history
…at extend ArrayAccess

Fixes backdrop-contrib#14
  • Loading branch information
argiepiano committed Aug 27, 2023
1 parent 80ee1c1 commit e8ffee0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/adapter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1172,20 +1172,23 @@ class FacetapiFacet implements ArrayAccess {
/**
* Implements ArrayAccess::offsetExists().
*/
public function offsetExists($offset) {
#[\ReturnTypeWillChange]
public function offsetExists($offset) {
return isset($this->facet[$offset]);
}

/**
* Implements ArrayAccess::offsetGet().
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset) {
return isset($this->facet[$offset]) ? $this->facet[$offset] : NULL;
}

/**
* Implements ArrayAccess::offsetSet().
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
if (NULL === $offset) {
$this->facet[] = $value;
Expand All @@ -1198,6 +1201,7 @@ class FacetapiFacet implements ArrayAccess {
/**
* Implements ArrayAccess::offsetUnset().
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset) {
unset($this->facet[$offset]);
}
Expand Down

0 comments on commit e8ffee0

Please sign in to comment.