Skip to content

Commit

Permalink
fix: Hide warning when using PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Mar 9, 2022
1 parent 26fdfcb commit 7020ece
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Configuration/HostConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@
class HostConfig extends HostConfigAbstract
{

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->data->offsetGet($offset);
}

#[\ReturnTypeWillChange]
public function offsetSet($offset, $value): void
{
$this->data->offsetSet($offset, $value);
}

#[\ReturnTypeWillChange]
public function offsetUnset($offset): void
{
$this->data->offsetUnset($offset);
Expand Down
3 changes: 3 additions & 0 deletions src/Configuration/Storage/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public function set(string $key, Node $value): void
$this->value[$key] = $value;
}

#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->get($offset)->getValue();
Expand All @@ -192,6 +193,7 @@ public function offsetExists($offset): bool
return $this->has($offset);
}

#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!$value instanceof Node) {
Expand All @@ -200,6 +202,7 @@ public function offsetSet($offset, $value)
$this->set($offset, $value);
}

#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->value[$offset]);
Expand Down

0 comments on commit 7020ece

Please sign in to comment.