@@ -61,7 +61,7 @@ public function __clone() {
6161 *
6262 * @return array
6363 */
64- public function toArray () {
64+ public function toArray () : array {
6565 $ data = $ this ->container ;
6666 foreach ( $ data as $ key => $ value ) {
6767 if ( $ value instanceof self ) {
@@ -83,7 +83,7 @@ public function toArray() {
8383 *
8484 * @return boolean true on success or false on failure.
8585 */
86- public function offsetExists ( $ offset ) {
86+ public function offsetExists ( $ offset ) : bool {
8787 return isset ( $ this ->container [ $ offset ] );
8888 }
8989
@@ -96,7 +96,7 @@ public function offsetExists( $offset ) {
9696 *
9797 * @return mixed Can return all value types.
9898 */
99- public function offsetGet ( $ offset ) {
99+ public function offsetGet ( $ offset ) : mixed {
100100 return isset ( $ this ->container [ $ offset ] ) ? $ this ->container [ $ offset ] : null ;
101101 }
102102
@@ -110,7 +110,7 @@ public function offsetGet( $offset ) {
110110 *
111111 * @return void
112112 */
113- public function offsetSet ( $ offset , $ data ) {
113+ public function offsetSet ( $ offset , $ data ) : void {
114114 if ( is_array ( $ data ) ) {
115115 $ data = new self ( $ data );
116116 }
@@ -131,7 +131,7 @@ public function offsetSet( $offset, $data ) {
131131 *
132132 * @return void
133133 */
134- public function offsetUnset ( $ offset ) {
134+ public function offsetUnset ( $ offset ) : void {
135135 unset( $ this ->container [ $ offset ] );
136136 }
137137}
0 commit comments