Skip to content

Commit f28c1a6

Browse files
committed
Add typing for ArrayAccess
1 parent 7247450 commit f28c1a6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Console/Config.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,26 @@ public function __construct(array $config = [])
3333
}
3434
}
3535

36-
public function offsetExists($offset)
36+
public function offsetExists(mixed $offset): bool
3737
{
3838
return isset($this->config[$offset]);
3939
}
4040

41-
public function offsetGet($offset)
41+
public function offsetGet(mixed $offset): mixed
4242
{
4343
if ($this->offsetExists($offset)) {
4444
return $this->config[$offset];
4545
}
46+
47+
return null;
4648
}
4749

48-
public function offsetSet($offset, $value)
50+
public function offsetSet(mixed $offset, mixed $value): void
4951
{
5052
$this->config[$offset] = $value;
5153
}
5254

53-
public function offsetUnset($offset)
55+
public function offsetUnset(mixed $offset): void
5456
{
5557
unset($this->config[$offset]);
5658
}

0 commit comments

Comments
 (0)