@@ -35,9 +35,9 @@ public function it_can_pluck_from_array_and_object_items()
35
35
36
36
$ this ->assertEquals (
37
37
[
38
- (object ) ['name ' => 'matt ' , 'hobby ' => 'coding ' ],
39
- ['name ' => 'tomo ' , 'hobby ' => 'cooking ' ],
40
- ],
38
+ (object ) ['name ' => 'matt ' , 'hobby ' => 'coding ' ],
39
+ ['name ' => 'tomo ' , 'hobby ' => 'cooking ' ],
40
+ ],
41
41
$ data ->pluckMany (['name ' , 'hobby ' ])->all ()
42
42
);
43
43
}
@@ -52,9 +52,9 @@ public function it_can_pluck_from_objects_that_implement_array_access_interface(
52
52
53
53
$ this ->assertEquals (
54
54
[
55
- ['name ' => 'marco ' , 'hobby ' => 'drinking ' ],
56
- ['name ' => 'belle ' , 'hobby ' => 'cross-stitch ' ],
57
- ],
55
+ ['name ' => 'marco ' , 'hobby ' => 'drinking ' ],
56
+ ['name ' => 'belle ' , 'hobby ' => 'cross-stitch ' ],
57
+ ],
58
58
$ data ->pluckMany (['name ' , 'hobby ' ])->all ()
59
59
);
60
60
}
@@ -69,22 +69,22 @@ public function __construct($arr)
69
69
$ this ->arr = $ arr ;
70
70
}
71
71
72
- public function offsetExists ($ offset )
72
+ public function offsetExists ($ offset ): bool
73
73
{
74
74
return isset ($ this ->arr [$ offset ]);
75
75
}
76
76
77
- public function offsetGet ($ offset )
77
+ public function offsetGet ($ offset ): mixed
78
78
{
79
79
return $ this ->arr [$ offset ];
80
80
}
81
81
82
- public function offsetSet ($ offset , $ value )
82
+ public function offsetSet ($ offset , $ value ): void
83
83
{
84
84
$ this ->arr [$ offset ] = $ value ;
85
85
}
86
86
87
- public function offsetUnset ($ offset )
87
+ public function offsetUnset ($ offset ): void
88
88
{
89
89
unset($ this ->arr [$ offset ]);
90
90
}
0 commit comments