Skip to content

Commit d1930b8

Browse files
committed
docs: add PHPDoc
1 parent f62d3cb commit d1930b8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

system/Helpers/Array/ArrayHelper.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,21 @@ final class ArrayHelper
2626
*
2727
* @used-by dot_array_search()
2828
*
29+
* @param string $index The index as dot array syntax.
30+
*
2931
* @return array|bool|int|object|string|null
3032
*/
3133
public static function dotSearch(string $index, array $array)
3234
{
3335
return self::arraySearchDot(self::convertToArray($index), $array);
3436
}
3537

36-
private static function convertToArray(string $index)
38+
/**
39+
* @param string $index The index as dot array syntax.
40+
*
41+
* @return list<string> The index as an array.
42+
*/
43+
private static function convertToArray(string $index): array
3744
{
3845
// See https://regex101.com/r/44Ipql/1
3946
$segments = preg_split(

0 commit comments

Comments
 (0)