diff --git a/system/Helpers/Array/ArrayHelper.php b/system/Helpers/Array/ArrayHelper.php index 10f9e227896a..b831a66aa4a9 100644 --- a/system/Helpers/Array/ArrayHelper.php +++ b/system/Helpers/Array/ArrayHelper.php @@ -24,6 +24,8 @@ 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) @@ -31,7 +33,12 @@ 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 The index as an array. + */ + private static function convertToArray(string $index): array { // See https://regex101.com/r/44Ipql/1 $segments = preg_split(