@@ -67,7 +67,8 @@ class htmldoc extends config implements \ArrayAccess, \Iterator {
67
67
* @param string $var The name of the property to retrieve, currently 'length' and output
68
68
* @return mixed The number of children in the object for length, the output config, or null if the parameter doesn't exist
69
69
*/
70
- public function __get (string $ var ) : mixed {
70
+ #[\ReturnTypeWillChange]
71
+ public function __get (string $ var ) {
71
72
if ($ var === 'config ' ) {
72
73
return $ this ->config ;
73
74
} elseif ($ var === 'length ' ) {
@@ -91,7 +92,7 @@ public function toArray() : array {
91
92
* @param mixed $i The key to be updated, can be a string or integer
92
93
* @param mixed $value The value of the array key in the children array to be updated
93
94
*/
94
- public function offsetSet (mixed $ i , mixed $ value ) : void {
95
+ public function offsetSet ($ i , $ value ) : void {
95
96
$ this ->children [$ i ] = $ value ;
96
97
}
97
98
@@ -101,7 +102,7 @@ public function offsetSet(mixed $i, mixed $value) : void {
101
102
* @param mixed $i The key to be checked
102
103
* @return bool Whether the key exists in the config array
103
104
*/
104
- public function offsetExists (mixed $ i ) : bool {
105
+ public function offsetExists ($ i ) : bool {
105
106
return isset ($ this ->children [$ i ]);
106
107
}
107
108
@@ -110,7 +111,7 @@ public function offsetExists(mixed $i) : bool {
110
111
*
111
112
* @param mixed $i The key to be removed
112
113
*/
113
- public function offsetUnset (mixed $ i ) : void {
114
+ public function offsetUnset ($ i ) : void {
114
115
unset($ this ->children [$ i ]);
115
116
}
116
117
@@ -120,7 +121,8 @@ public function offsetUnset(mixed $i) : void {
120
121
* @param mixed $i The key to be accessed, can be a string or integer
121
122
* @return mixed An HTMLdoc object containing the child node at the requested position or null if there is no child at the requested position
122
123
*/
123
- public function offsetGet (mixed $ i ) : mixed { // return reference so you can set it like an array
124
+ #[\ReturnTypeWillChange]
125
+ public function offsetGet ($ i ) { // return reference so you can set it like an array
124
126
if (isset ($ this ->children [$ i ])) {
125
127
$ obj = new htmldoc ($ this ->config );
126
128
$ obj ->collection ([$ this ->children [$ i ]]);
0 commit comments