Skip to content

Commit

Permalink
docs: add PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 31, 2023
1 parent 50a1aaa commit 9101a92
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion system/Helpers/Array/ArrayHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@ final class ArrayHelper
*
* @used-by dot_array_search()
*
* @param string $index The index as dot array syntax.
*
* @return array|bool|int|object|string|null
*/
public static function dotSearch(string $index, array $array)
{
return self::arraySearchDot(self::convertToArray($index), $array);
}

private static function convertToArray(string $index)
/**
* @param string $index The index as dot array syntax.
*
* @return list<string> The index as an array.
*/
private static function convertToArray(string $index): array
{
// See https://regex101.com/r/44Ipql/1
$segments = preg_split(
Expand Down

0 comments on commit 9101a92

Please sign in to comment.