17
17
final class ArrayHelper
18
18
{
19
19
/**
20
- * Searches an array through dot syntax. Supports
21
- * wildcard searches, like foo.*.bar
20
+ * Searches an array through dot syntax. Supports wildcard searches,
21
+ * like `foo.*.bar`.
22
+ *
23
+ * @used-by dot_array_search()
22
24
*
23
25
* @return array|bool|int|object|string|null
24
26
*/
@@ -38,8 +40,9 @@ public static function dotSearch(string $index, array $array)
38
40
}
39
41
40
42
/**
41
- * Used by `dotArraySearch()` to recursively search the
42
- * array with wildcards.
43
+ * Recursively search the array with wildcards.
44
+ *
45
+ * @used-by dotSearch()
43
46
*
44
47
* @return array|bool|float|int|object|string|null
45
48
*/
@@ -101,6 +104,8 @@ private static function arraySearchDot(array $indexes, array $array)
101
104
/**
102
105
* Groups all rows by their index values. Result's depth equals number of indexes
103
106
*
107
+ * @used-by array_group_by()
108
+ *
104
109
* @param array $array Data array (i.e. from query result)
105
110
* @param array $indexes Indexes to group by. Dot syntax used. Returns $array if empty
106
111
* @param bool $includeEmpty If true, null and '' are also added as valid keys to group
@@ -123,10 +128,10 @@ public static function groupBy(array $array, array $indexes, bool $includeEmpty
123
128
}
124
129
125
130
/**
126
- * Used by `arrayGroupBy()` to recursively attach $row to the $indexes path of values found by
127
- * `dot_array_search()`
131
+ * Recursively attach $row to the $indexes path of values found by
132
+ * `dot_array_search()`.
128
133
*
129
- * @internal This should not be used on its own
134
+ * @used-by groupBy()
130
135
*/
131
136
private static function arrayAttachIndexedValue (array $ result , array $ row , array $ indexes , bool $ includeEmpty ): array
132
137
{
0 commit comments