@@ -67,7 +67,7 @@ class htmldoc extends config implements \ArrayAccess, \Iterator {
6767 * @param string $var The name of the property to retrieve, currently 'length' and output
6868 * @return mixed The number of children in the object for length, the output config, or null if the parameter doesn't exist
6969 */
70- public function __get (string $ var ) {
70+ public function __get (string $ var ) : mixed {
7171 if ($ var === 'config ' ) {
7272 return $ this ->config ;
7373 } elseif ($ var === 'length ' ) {
@@ -88,39 +88,39 @@ public function toArray() : array {
8888 /**
8989 * Array access method allows you to set the object's configuration as properties
9090 *
91- * @param string|integer $i The key to be updated, can be a string or integer
91+ * @param mixed $i The key to be updated, can be a string or integer
9292 * @param mixed $value The value of the array key in the children array to be updated
9393 */
94- public function offsetSet ($ i , $ value ) : void {
94+ public function offsetSet (mixed $ i , mixed $ value ) : void {
9595 $ this ->children [$ i ] = $ value ;
9696 }
9797
9898 /**
9999 * Array access method allows you to check that a key exists in the configuration array
100100 *
101- * @param string|integer $i The key to be checked, can be a string or integer
101+ * @param mixed $i The key to be checked
102102 * @return bool Whether the key exists in the config array
103103 */
104- public function offsetExists ($ i ) : bool {
104+ public function offsetExists (mixed $ i ) : bool {
105105 return isset ($ this ->children [$ i ]);
106106 }
107107
108108 /**
109109 * Removes a key from the configuration array
110110 *
111- * @param string|integer $i The key to be removed, can be a string or integer
111+ * @param mixed $i The key to be removed
112112 */
113- public function offsetUnset ($ i ) : void {
113+ public function offsetUnset (mixed $ i ) : void {
114114 unset($ this ->children [$ i ]);
115115 }
116116
117117 /**
118118 * Retrieves a value from the configuration array with the specified key
119119 *
120- * @param string|integer $i The key to be accessed, can be a string or integer
121- * @return htmldoc|null The child node at the requested position or null if there is no child at the requested position
120+ * @param mixed $i The key to be accessed, can be a string or integer
121+ * @return mixed An HTMLdoc object containing the child node at the requested position or null if there is no child at the requested position
122122 */
123- public function offsetGet (mixed $ i ) : ? htmldoc { // return reference so you can set it like an array
123+ public function offsetGet (mixed $ i ) : mixed { // return reference so you can set it like an array
124124 if (isset ($ this ->children [$ i ])) {
125125 $ obj = new htmldoc ($ this ->config );
126126 $ obj ->collection ([$ this ->children [$ i ]]);
@@ -132,9 +132,9 @@ public function offsetGet(mixed $i) : ?htmldoc { // return reference so you can
132132 /**
133133 * Retrieve the document node in the current position
134134 *
135- * @return htmldoc|null The child node at the current pointer position or null if there are no children
135+ * @return mixed An HTMLdoc object containing the child node at the current pointer position or null if there are no children
136136 */
137- public function current () : ? htmldoc {
137+ public function current () : mixed {
138138 if (isset ($ this ->children [$ this ->pointer ])) {
139139 $ obj = new htmldoc ($ this ->config );
140140 $ obj ->collection ([$ this ->children [$ this ->pointer ]]);
0 commit comments