Skip to content

Commit 7ee981a

Browse files
committed
docs: add PHPDoc
1 parent 603db9f commit 7ee981a

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
@@ -24,14 +24,21 @@ final class ArrayHelper
2424
*
2525
* @used-by dot_array_search()
2626
*
27+
* @param string $index The index as dot array syntax.
28+
*
2729
* @return array|bool|int|object|string|null
2830
*/
2931
public static function dotSearch(string $index, array $array)
3032
{
3133
return self::arraySearchDot(self::convertToArray($index), $array);
3234
}
3335

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

0 commit comments

Comments
 (0)