Skip to content

Commit d6062ab

Browse files
committed
Fixed compatibility issue with ArrayAccess in htmldoc.php.
1 parent f3310d8 commit d6062ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/htmldoc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function offsetUnset($i) : void {
117117
* @param string|integer $i The key to be accessed, can be a string or integer
118118
* @return mixed The requested value or null if the key doesn't exist
119119
*/
120-
public function offsetGet($i) { // return reference so you can set it like an array
120+
public function offsetGet(mixed $i) : mixed { // return reference so you can set it like an array
121121
return $this->children[$i] ?? null;
122122
}
123123

@@ -126,7 +126,7 @@ public function offsetGet($i) { // return reference so you can set it like an ar
126126
*
127127
* @return tag|text|comment|doctype The child node at the current pointer position
128128
*/
129-
public function current() {
129+
public function current() : mixed {
130130
return $this->children[$this->pointer] ?? null;
131131
}
132132

0 commit comments

Comments
 (0)