@@ -176,7 +176,7 @@ public static function valueToUpper(array $arr): array
176176 * 将数组中的值全部转为大写或小写
177177 *
178178 * @param array|iterable $arr
179- * @param bool $toUpper
179+ * @param bool $toUpper
180180 *
181181 * @return array
182182 */
@@ -242,9 +242,9 @@ public static function valueExistsOne($check, array $sampleArr): bool
242242 * ******* 不区分大小写,检查 一个或多个值是否 全存在数组中 *******
243243 * 有一个不存在即返回 false
244244 *
245- * @param string|array $need
246- * @param array $arr 只能检查一维数组
247- * @param bool $type 是否同时验证类型
245+ * @param string|array $need
246+ * @param array|iterable $arr 只能检查一维数组
247+ * @param bool $type 是否同时验证类型
248248 *
249249 * @return bool | string 不存在的会返回 检查到的 字段,判断时 请使用 ArrHelper::existsAll($need,$arr)===true 来验证是否全存在
250250 */
@@ -273,9 +273,9 @@ public static function existsAll($need, $arr, bool $type = false)
273273 * ******* 不区分大小写,检查 一个或多个值是否存在数组中 *******
274274 * 有一个存在就返回 true 都不存在 return false
275275 *
276- * @param string|array $need
276+ * @param string|array $need
277277 * @param array|iterable $arr 只能检查一维数组
278- * @param bool $type 是否同时验证类型
278+ * @param bool $type 是否同时验证类型
279279 *
280280 * @return bool
281281 */
@@ -327,7 +327,7 @@ public static function getKeyMaxWidth(array $data, bool $excludeInt = true): int
327327 foreach ($ data as $ key => $ value ) {
328328 // key is not a integer
329329 if (!$ excludeInt || !is_numeric ($ key )) {
330- $ width = mb_strlen ($ key , 'UTF-8 ' );
330+ $ width = mb_strlen (( string ) $ key , 'UTF-8 ' );
331331 $ maxWidth = $ width > $ maxWidth ? $ width : $ maxWidth ;
332332 }
333333 }
@@ -356,7 +356,7 @@ public static function getMaxWidth(array $keys, bool $excludeInt = true): int
356356 foreach ($ keys as $ key ) {
357357 // key is not a integer
358358 if (!$ excludeInt || !is_numeric ($ key )) {
359- $ keyWidth = mb_strlen ($ key , 'UTF-8 ' );
359+ $ keyWidth = mb_strlen (( string ) $ key , 'UTF-8 ' );
360360 $ maxWidth = $ keyWidth > $ maxWidth ? $ keyWidth : $ maxWidth ;
361361 }
362362 }
@@ -617,8 +617,8 @@ public static function prepend(array $array, $value, $key = null): array
617617 * remove the $key of the $arr, and return value.
618618 *
619619 * @param string|int $key
620- * @param array $arr
621- * @param mixed $default
620+ * @param array $arr
621+ * @param mixed $default
622622 *
623623 * @return mixed
624624 */
@@ -637,9 +637,9 @@ public static function remove(array &$arr, $key, $default = null)
637637 /**
638638 * Get a value from the array, and remove it.
639639 *
640- * @param array|ArrayAccess $array
641- * @param string|int $key
642- * @param mixed $default
640+ * @param array|ArrayAccess $array
641+ * @param string|int $key
642+ * @param mixed $default
643643 *
644644 * @return mixed
645645 */
@@ -711,13 +711,13 @@ public static function wrap($value): array
711711 /**
712712 * array 递归 转换成 字符串
713713 *
714- * @param array $array
715- * @param int $length
716- * @param int $cycles 至多循环六次 $num >= 6
717- * @param bool $showKey
718- * @param bool $addMark
719- * @param string $separator
720- * @param string $string
714+ * @param array $array
715+ * @param int $length
716+ * @param int $cycles 至多循环六次 $num >= 6
717+ * @param bool $showKey
718+ * @param bool $addMark
719+ * @param string $separator
720+ * @param string $string
721721 *
722722 * @return string
723723 */
@@ -749,14 +749,14 @@ public static function toString(
749749
750750 if (is_array ($ value )) {
751751 $ string .= $ keyStr . 'Array( ' . self ::toString (
752- $ value ,
753- $ length ,
754- $ cycles ,
755- $ showKey ,
756- $ addMark ,
757- $ separator ,
758- $ string
759- ) . ') ' . $ separator ;
752+ $ value ,
753+ $ length ,
754+ $ cycles ,
755+ $ showKey ,
756+ $ addMark ,
757+ $ separator ,
758+ $ string
759+ ) . ') ' . $ separator ;
760760 } elseif (is_object ($ value )) {
761761 $ string .= $ keyStr . 'Object( ' . get_class ($ value ) . ') ' . $ separator ;
762762 } elseif (is_resource ($ value )) {
0 commit comments