diff --git a/src/Drivers/StaticEntitySet.php b/src/Drivers/StaticEntitySet.php index 56bd5cdbb..ddaf2d2a7 100644 --- a/src/Drivers/StaticEntitySet.php +++ b/src/Drivers/StaticEntitySet.php @@ -46,7 +46,7 @@ public function offsetExists($offset): bool return array_key_exists($offset, $this->results); } - public function offsetGet($offset) + public function offsetGet($offset): ?Entity { return $this->results[$offset]; } diff --git a/src/Helper/ObjectArray.php b/src/Helper/ObjectArray.php index 425ba7594..7d1734f2e 100644 --- a/src/Helper/ObjectArray.php +++ b/src/Helper/ObjectArray.php @@ -115,6 +115,7 @@ public function exists($key): bool * Get the current value in the array * @return mixed */ + #[\ReturnTypeWillChange] public function current() { return current($this->array); @@ -199,6 +200,7 @@ public function get($key) * @param mixed $offset * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->get($offset); diff --git a/src/Transaction/MetadataContainer.php b/src/Transaction/MetadataContainer.php index b3a8cc75a..53c73b184 100644 --- a/src/Transaction/MetadataContainer.php +++ b/src/Transaction/MetadataContainer.php @@ -136,7 +136,7 @@ public function offsetExists($offset): bool return array_key_exists($offset, $this->properties); } - public function offsetGet($offset) + public function offsetGet($offset): ?string { return $this->properties[$offset]; }