Skip to content

Commit 8bbc203

Browse files
committedDec 17, 2024
Fix deprecations on PHP8
As PHP attributes are implemented in a BC manner (treated as comments on PHP5/7), the change is fully backwards-compatible. Fixes #1
1 parent a1ad04f commit 8bbc203

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/JsonDiffResult.php

+4
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,25 @@ public function __get($name)
5959
}
6060

6161
// Array Access
62+
#[\ReturnTypeWillChange]
6263
public function offsetExists($offset)
6364
{
6465
return isset($this->{$offset}) ? $this->{$offset} : null;
6566
}
6667

68+
#[\ReturnTypeWillChange]
6769
public function offsetGet($offset)
6870
{
6971
return isset($this->{$offset}) ? $this->{$offset} : null;
7072
}
7173

74+
#[\ReturnTypeWillChange]
7275
public function offsetSet($offset, $value)
7376
{
7477
throw new CannotChangeDiffResult;
7578
}
7679

80+
#[\ReturnTypeWillChange]
7781
public function offsetUnset($offset) {
7882
throw new CannotChangeDiffResult;
7983
}

0 commit comments

Comments
 (0)
Please sign in to comment.