SetupResponse - Fix php8 warning
authorTim Otten <totten@civicrm.org>
Sun, 16 Jul 2023 04:10:02 +0000 (21:10 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 16 Jul 2023 05:12:04 +0000 (22:12 -0700)
setup/src/Setup/UI/SetupResponse.php

index 43c42451f2a0a9e44acb9312964cac8d694389b4..dd6a9627325fc2dcc9684e8884c4b2b9750cfb42 100644 (file)
@@ -64,10 +64,11 @@ class SetupResponse implements \ArrayAccess {
     ];
   }
 
-  public function offsetExists($offset) {
+  public function offsetExists($offset): bool {
     return isset($this->oldFieldMap[$offset]);
   }
 
+  #[\ReturnTypeWillChange]
   public function &offsetGet($offset) {
     if (isset($this->oldFieldMap[$offset])) {
       $field = $this->oldFieldMap[$offset];
@@ -78,14 +79,14 @@ class SetupResponse implements \ArrayAccess {
     }
   }
 
-  public function offsetSet($offset, $value) {
+  public function offsetSet($offset, $value): void {
     if (isset($this->oldFieldMap[$offset])) {
       $field = $this->oldFieldMap[$offset];
       $this->{$field} = $value;
     }
   }
 
-  public function offsetUnset($offset) {
+  public function offsetUnset($offset): void {
     if (isset($this->oldFieldMap[$offset])) {
       $field = $this->oldFieldMap[$offset];
       unset($this->{$field});