@@ -40,6 +40,10 @@ public function map(callable $fn)
40
40
41
41
/**
42
42
* Alias of map().
43
+ *
44
+ * @param callable $fn The callback.
45
+ *
46
+ * @return self
43
47
*/
44
48
public function collect (callable $ fn )
45
49
{
@@ -61,6 +65,11 @@ public function reduce(callable $fn, $memo)
61
65
62
66
/**
63
67
* Alias of reduce().
68
+ *
69
+ * @param callable $fn The callback.
70
+ * @param mixed $memo The initial value carried over to each iteration and returned finally.
71
+ *
72
+ * @return mixed
64
73
*/
65
74
public function foldl (callable $ fn , $ memo )
66
75
{
@@ -69,6 +78,11 @@ public function foldl(callable $fn, $memo)
69
78
70
79
/**
71
80
* Alias of reduce().
81
+ *
82
+ * @param callable $fn The callback.
83
+ * @param mixed $memo The initial value carried over to each iteration and returned finally.
84
+ *
85
+ * @return mixed
72
86
*/
73
87
public function inject (callable $ fn , $ memo )
74
88
{
@@ -90,6 +104,11 @@ public function reduceRight(callable $fn, $memo)
90
104
91
105
/**
92
106
* Alias of reduceRight().
107
+ *
108
+ * @param callable $fn The callback.
109
+ * @param mixed $memo The initial value carried over to each iteration and returned finally.
110
+ *
111
+ * @return mixed
93
112
*/
94
113
public function foldr (callable $ fn , $ memo )
95
114
{
@@ -115,6 +134,11 @@ public function find(callable $fn, $useValue = true)
115
134
116
135
/**
117
136
* Alias of find().
137
+ *
138
+ * @param callable $fn The truth test callback.
139
+ * @param bool $useValue Whether to return value or the index on match.
140
+ *
141
+ * @return mixed|null
118
142
*/
119
143
public function detect (callable $ fn )
120
144
{
@@ -141,6 +165,10 @@ public function filter($fn = null)
141
165
142
166
/**
143
167
* Alias of filter().
168
+ *
169
+ * @param callable|string|null $fn The truth test callback.
170
+ *
171
+ * @return self
144
172
*/
145
173
public function select (callable $ fn = null )
146
174
{
@@ -175,6 +203,10 @@ public function every(callable $fn)
175
203
176
204
/**
177
205
* Alias of every().
206
+ *
207
+ * @param callable $fn The truth test callback.
208
+ *
209
+ * @return bool
178
210
*/
179
211
public function all (callable $ fn )
180
212
{
@@ -195,6 +227,10 @@ public function some(callable $fn)
195
227
196
228
/**
197
229
* Alias of some().
230
+ *
231
+ * @param callable $fn The truth test callback.
232
+ *
233
+ * @return bool
198
234
*/
199
235
public function any (callable $ fn )
200
236
{
0 commit comments