File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -242,15 +242,17 @@ public function shift()
242
242
* @access public
243
243
* @param mixed $value 元素
244
244
* @param string $key KEY
245
- * @return void
245
+ * @return $this
246
246
*/
247
- public function push ($ value , string $ key = null ): void
247
+ public function push ($ value , string $ key = null )
248
248
{
249
249
if (is_null ($ key )) {
250
250
$ this ->items [] = $ value ;
251
251
} else {
252
252
$ this ->items [$ key ] = $ value ;
253
253
}
254
+
255
+ return $ this ;
254
256
}
255
257
256
258
/**
@@ -277,15 +279,17 @@ public function chunk(int $size, bool $preserveKeys = false)
277
279
* @access public
278
280
* @param mixed $value 元素
279
281
* @param string $key KEY
280
- * @return void
282
+ * @return $this
281
283
*/
282
- public function unshift ($ value , string $ key = null ): void
284
+ public function unshift ($ value , string $ key = null )
283
285
{
284
286
if (is_null ($ key )) {
285
287
array_unshift ($ this ->items , $ value );
286
288
} else {
287
289
$ this ->items = [$ key => $ value ] + $ this ->items ;
288
290
}
291
+
292
+ return $ this ;
289
293
}
290
294
291
295
/**
You can’t perform that action at this time.
0 commit comments