Skip to content

Commit

Permalink
docs: add PHPDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 6, 2023
1 parent 3c4b238 commit dce6576
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 @@ -29,14 +29,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 dce6576

Please sign in to comment.