Skip to content

Commit 49e43da

Browse files
authored
ArrayAccess Compatibility
I found that offsetGet doesn't always return mixed, so leaving it as ReturnTypeWillChange for now
1 parent 2e267e7 commit 49e43da

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Config.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,23 @@ private function merge(array $config)
6262
$this->config = array_replace($this->config, $config);
6363
}
6464

65-
public function offsetExists($offset)
65+
public function offsetExists($offset): bool
6666
{
6767
return isset($this->config[$offset]);
6868
}
6969

70+
#[\ReturnTypeWillChange]
7071
public function offsetGet($offset)
7172
{
7273
return $this->config[$offset];
7374
}
7475

75-
public function offsetSet($offset, $value)
76+
public function offsetSet($offset, $value): void
7677
{
7778
$this->config[$offset] = $value;
7879
}
7980

80-
public function offsetUnset($offset)
81+
public function offsetUnset($offset): void
8182
{
8283
unset($this->config[$offset]);
8384
}

0 commit comments

Comments
 (0)