Skip to content

Commit

Permalink
Merge pull request #3 from samilturgut/master
Browse files Browse the repository at this point in the history
Fixed method return type compatible error for php8.
  • Loading branch information
fustundag authored Dec 6, 2022
2 parents 510a7eb + b0bacf2 commit 0c4b3b5
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 0c4b3b5

Please sign in to comment.