diff --git a/libraries/class-recursive-arrayaccess.php b/libraries/class-recursive-arrayaccess.php index 1c3029d2..1a8a2b6f 100644 --- a/libraries/class-recursive-arrayaccess.php +++ b/libraries/class-recursive-arrayaccess.php @@ -61,7 +61,7 @@ public function __clone() { * * @return array */ - public function toArray() { + public function toArray() : array { $data = $this->container; foreach ( $data as $key => $value ) { if ( $value instanceof self ) { @@ -83,7 +83,7 @@ public function toArray() { * * @return boolean true on success or false on failure. */ - public function offsetExists( $offset ) { + public function offsetExists( $offset ) : bool { return isset( $this->container[ $offset ] ); } @@ -96,7 +96,7 @@ public function offsetExists( $offset ) { * * @return mixed Can return all value types. */ - public function offsetGet( $offset ) { + public function offsetGet( $offset ) : mixed { return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null; } @@ -110,7 +110,7 @@ public function offsetGet( $offset ) { * * @return void */ - public function offsetSet( $offset, $data ) { + public function offsetSet( $offset, $data ) : void { if ( is_array( $data ) ) { $data = new self( $data ); } @@ -131,7 +131,7 @@ public function offsetSet( $offset, $data ) { * * @return void */ - public function offsetUnset( $offset ) { + public function offsetUnset( $offset ) : void { unset( $this->container[ $offset ] ); } } \ No newline at end of file