@@ -22,9 +22,7 @@ class Arrays
22
22
23
23
/**
24
24
* Returns item from array or $default if item is not set.
25
- * @param array
26
- * @param string|int|array one or more keys
27
- * @param mixed
25
+ * @param string|int|array $key one or more keys
28
26
* @return mixed
29
27
* @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
30
28
*/
@@ -46,8 +44,7 @@ public static function get(array $arr, $key, $default = NULL)
46
44
47
45
/**
48
46
* Returns reference to array item.
49
- * @param array
50
- * @param string|int|array one or more keys
47
+ * @param string|int|array $key one or more keys
51
48
* @return mixed
52
49
* @throws Nette\InvalidArgumentException if traversed item is not an array
53
50
*/
@@ -66,7 +63,6 @@ public static function &getRef(array &$arr, $key)
66
63
67
64
/**
68
65
* Recursively appends elements of remaining keys from the second array to the first.
69
- * @return array
70
66
*/
71
67
public static function mergeTree (array $ arr1 , array $ arr2 ): array
72
68
{
@@ -131,7 +127,6 @@ public static function renameKey(array &$arr, $oldKey, $newKey)
131
127
132
128
/**
133
129
* Returns array entries that match the pattern.
134
- * @return array
135
130
*/
136
131
public static function grep (array $ arr , string $ pattern , int $ flags = 0 ): array
137
132
{
@@ -141,7 +136,6 @@ public static function grep(array $arr, string $pattern, int $flags = 0): array
141
136
142
137
/**
143
138
* Returns flattened array.
144
- * @return array
145
139
*/
146
140
public static function flatten (array $ arr , bool $ preserveKeys = FALSE ): array
147
141
{
@@ -156,7 +150,6 @@ public static function flatten(array $arr, bool $preserveKeys = FALSE): array
156
150
157
151
/**
158
152
* Finds whether a variable is a zero-based integer indexed array.
159
- * @return bool
160
153
*/
161
154
public static function isList ($ value ): bool
162
155
{
@@ -218,7 +211,6 @@ public static function associate(array $arr, $path)
218
211
219
212
/**
220
213
* Normalizes to associative array.
221
- * @return array
222
214
*/
223
215
public static function normalize (array $ arr , $ filling = NULL ): array
224
216
{
@@ -232,9 +224,7 @@ public static function normalize(array $arr, $filling = NULL): array
232
224
233
225
/**
234
226
* Picks element from the array by key and return its value.
235
- * @param array
236
- * @param string|int array key
237
- * @param mixed
227
+ * @param string|int $key array key
238
228
* @return mixed
239
229
* @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
240
230
*/
@@ -256,7 +246,6 @@ public static function pick(array &$arr, $key, $default = NULL)
256
246
257
247
/**
258
248
* Tests whether some element in the array passes the callback test.
259
- * @return bool
260
249
*/
261
250
public static function some (array $ arr , callable $ callback ): bool
262
251
{
@@ -271,7 +260,6 @@ public static function some(array $arr, callable $callback): bool
271
260
272
261
/**
273
262
* Tests whether all elements in the array pass the callback test.
274
- * @return bool
275
263
*/
276
264
public static function every (array $ arr , callable $ callback ): bool
277
265
{
@@ -286,7 +274,6 @@ public static function every(array $arr, callable $callback): bool
286
274
287
275
/**
288
276
* Applies the callback to the elements of the array.
289
- * @return array
290
277
*/
291
278
public static function map (array $ arr , callable $ callback ): array
292
279
{
0 commit comments