From 9101a92ca10312511601343a18505bbcda6ad957 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 31 Oct 2023 15:11:20 +0900 Subject: [PATCH] docs: add PHPDoc --- system/Helpers/Array/ArrayHelper.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(