Skip to content

Commit f7eb462

Browse files
committed
Matrix: PHP 8.1 compatibility
ArrayAccess now has tentative return types, which cause deprecation warnings to be generated.
1 parent c60f6e1 commit f7eb462

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Matrix.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ class Matrix implements \ArrayAccess{
3636
private int $rows;
3737
private int $columns;
3838

39-
public function offsetExists($offset){
39+
public function offsetExists($offset) : bool{
4040
return isset($this->matrix[(int) $offset]);
4141
}
4242

4343
public function offsetGet($offset){
4444
return $this->matrix[(int) $offset];
4545
}
4646

47-
public function offsetSet($offset, $value){
47+
public function offsetSet($offset, $value) : void{
4848
$this->matrix[(int) $offset] = $value;
4949
}
5050

51-
public function offsetUnset($offset){
51+
public function offsetUnset($offset) : void{
5252
unset($this->matrix[(int) $offset]);
5353
}
5454

0 commit comments

Comments
 (0)