@@ -22,9 +22,7 @@ class Arrays
2222
2323 /**
2424 * 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
2826 * @return mixed
2927 * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
3028 */
@@ -46,8 +44,7 @@ public static function get(array $arr, $key, $default = NULL)
4644
4745 /**
4846 * 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
5148 * @return mixed
5249 * @throws Nette\InvalidArgumentException if traversed item is not an array
5350 */
@@ -66,7 +63,6 @@ public static function &getRef(array &$arr, $key)
6663
6764 /**
6865 * Recursively appends elements of remaining keys from the second array to the first.
69- * @return array
7066 */
7167 public static function mergeTree (array $ arr1 , array $ arr2 ): array
7268 {
@@ -131,7 +127,6 @@ public static function renameKey(array &$arr, $oldKey, $newKey)
131127
132128 /**
133129 * Returns array entries that match the pattern.
134- * @return array
135130 */
136131 public static function grep (array $ arr , string $ pattern , int $ flags = 0 ): array
137132 {
@@ -141,7 +136,6 @@ public static function grep(array $arr, string $pattern, int $flags = 0): array
141136
142137 /**
143138 * Returns flattened array.
144- * @return array
145139 */
146140 public static function flatten (array $ arr , bool $ preserveKeys = FALSE ): array
147141 {
@@ -156,7 +150,6 @@ public static function flatten(array $arr, bool $preserveKeys = FALSE): array
156150
157151 /**
158152 * Finds whether a variable is a zero-based integer indexed array.
159- * @return bool
160153 */
161154 public static function isList ($ value ): bool
162155 {
@@ -218,7 +211,6 @@ public static function associate(array $arr, $path)
218211
219212 /**
220213 * Normalizes to associative array.
221- * @return array
222214 */
223215 public static function normalize (array $ arr , $ filling = NULL ): array
224216 {
@@ -232,9 +224,7 @@ public static function normalize(array $arr, $filling = NULL): array
232224
233225 /**
234226 * 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
238228 * @return mixed
239229 * @throws Nette\InvalidArgumentException if item does not exist and default value is not provided
240230 */
@@ -256,7 +246,6 @@ public static function pick(array &$arr, $key, $default = NULL)
256246
257247 /**
258248 * Tests whether some element in the array passes the callback test.
259- * @return bool
260249 */
261250 public static function some (array $ arr , callable $ callback ): bool
262251 {
@@ -271,7 +260,6 @@ public static function some(array $arr, callable $callback): bool
271260
272261 /**
273262 * Tests whether all elements in the array pass the callback test.
274- * @return bool
275263 */
276264 public static function every (array $ arr , callable $ callback ): bool
277265 {
@@ -286,7 +274,6 @@ public static function every(array $arr, callable $callback): bool
286274
287275 /**
288276 * Applies the callback to the elements of the array.
289- * @return array
290277 */
291278 public static function map (array $ arr , callable $ callback ): array
292279 {
0 commit comments