@@ -70,11 +70,21 @@ public function unserialize($serialized)
70
70
$ this ->builderConfig = json_decode ($ serialized , true );
71
71
}
72
72
73
+ public function __unserialize ($ data )
74
+ {
75
+ $ this ->builderConfig = $ data ;
76
+ }
77
+
73
78
public function serialize ()
74
79
{
75
80
return json_encode ($ this ->builderConfig );
76
81
}
77
82
83
+ public function __serialize (): array
84
+ {
85
+ return $ this ->builderConfig ;
86
+ }
87
+
78
88
/**
79
89
* Attach a plugin to every client created by the builder
80
90
*
@@ -166,23 +176,23 @@ public function set($key, $service)
166
176
return $ this ;
167
177
}
168
178
169
- public function offsetSet ($ offset , $ value )
179
+ public function offsetSet ($ offset , $ value ): void
170
180
{
171
181
$ this ->set ($ offset , $ value );
172
182
}
173
183
174
- public function offsetUnset ($ offset )
184
+ public function offsetUnset ($ offset ): void
175
185
{
176
186
unset($ this ->builderConfig [$ offset ]);
177
187
unset($ this ->clients [$ offset ]);
178
188
}
179
189
180
- public function offsetExists ($ offset )
190
+ public function offsetExists ($ offset ): bool
181
191
{
182
192
return isset ($ this ->builderConfig [$ offset ]) || isset ($ this ->clients [$ offset ]);
183
193
}
184
194
185
- public function offsetGet ($ offset )
195
+ public function offsetGet ($ offset ): mixed
186
196
{
187
197
return $ this ->get ($ offset );
188
198
}
0 commit comments