From d1930b837dbc1aa8338dc2c6c082ed475ccde221 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 81d34170c5c0..c5395c674c49 100644 --- a/system/Helpers/Array/ArrayHelper.php +++ b/system/Helpers/Array/ArrayHelper.php @@ -26,6 +26,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) @@ -33,7 +35,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(