Skip to content

Commit

Permalink
Fixed method return type compatible error for php8.
Browse files Browse the repository at this point in the history
  • Loading branch information
samilturgut committed Nov 28, 2022
1 parent 510a7eb commit b0bacf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function offsetGet($offset)
return $this->{$this->collection_key}[$offset];
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
if (!is_numeric($offset)) {
parent::offsetSet($offset, $value);
Expand All @@ -82,7 +82,7 @@ public function offsetSet($offset, $value)
}
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
if (!is_numeric($offset)) {
parent::offsetUnset($offset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function offsetGet($offset)
return $this->$offset ?? $this->__get($offset);
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
if (property_exists($this, $offset)) {
$this->$offset = $value;
Expand All @@ -268,7 +268,7 @@ public function offsetSet($offset, $value)
}
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
unset($this->modelData[$offset]);
}
Expand Down

0 comments on commit b0bacf2

Please sign in to comment.