@@ -176,7 +176,7 @@ public static function valueToUpper(array $arr): array
176
176
* 将数组中的值全部转为大写或小写
177
177
*
178
178
* @param array|iterable $arr
179
- * @param bool $toUpper
179
+ * @param bool $toUpper
180
180
*
181
181
* @return array
182
182
*/
@@ -242,9 +242,9 @@ public static function valueExistsOne($check, array $sampleArr): bool
242
242
* ******* 不区分大小写,检查 一个或多个值是否 全存在数组中 *******
243
243
* 有一个不存在即返回 false
244
244
*
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 是否同时验证类型
248
248
*
249
249
* @return bool | string 不存在的会返回 检查到的 字段,判断时 请使用 ArrHelper::existsAll($need,$arr)===true 来验证是否全存在
250
250
*/
@@ -273,9 +273,9 @@ public static function existsAll($need, $arr, bool $type = false)
273
273
* ******* 不区分大小写,检查 一个或多个值是否存在数组中 *******
274
274
* 有一个存在就返回 true 都不存在 return false
275
275
*
276
- * @param string|array $need
276
+ * @param string|array $need
277
277
* @param array|iterable $arr 只能检查一维数组
278
- * @param bool $type 是否同时验证类型
278
+ * @param bool $type 是否同时验证类型
279
279
*
280
280
* @return bool
281
281
*/
@@ -327,7 +327,7 @@ public static function getKeyMaxWidth(array $data, bool $excludeInt = true): int
327
327
foreach ($ data as $ key => $ value ) {
328
328
// key is not a integer
329
329
if (!$ excludeInt || !is_numeric ($ key )) {
330
- $ width = mb_strlen ($ key , 'UTF-8 ' );
330
+ $ width = mb_strlen (( string ) $ key , 'UTF-8 ' );
331
331
$ maxWidth = $ width > $ maxWidth ? $ width : $ maxWidth ;
332
332
}
333
333
}
@@ -356,7 +356,7 @@ public static function getMaxWidth(array $keys, bool $excludeInt = true): int
356
356
foreach ($ keys as $ key ) {
357
357
// key is not a integer
358
358
if (!$ excludeInt || !is_numeric ($ key )) {
359
- $ keyWidth = mb_strlen ($ key , 'UTF-8 ' );
359
+ $ keyWidth = mb_strlen (( string ) $ key , 'UTF-8 ' );
360
360
$ maxWidth = $ keyWidth > $ maxWidth ? $ keyWidth : $ maxWidth ;
361
361
}
362
362
}
@@ -617,8 +617,8 @@ public static function prepend(array $array, $value, $key = null): array
617
617
* remove the $key of the $arr, and return value.
618
618
*
619
619
* @param string|int $key
620
- * @param array $arr
621
- * @param mixed $default
620
+ * @param array $arr
621
+ * @param mixed $default
622
622
*
623
623
* @return mixed
624
624
*/
@@ -637,9 +637,9 @@ public static function remove(array &$arr, $key, $default = null)
637
637
/**
638
638
* Get a value from the array, and remove it.
639
639
*
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
643
643
*
644
644
* @return mixed
645
645
*/
@@ -711,13 +711,13 @@ public static function wrap($value): array
711
711
/**
712
712
* array 递归 转换成 字符串
713
713
*
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
721
721
*
722
722
* @return string
723
723
*/
@@ -749,14 +749,14 @@ public static function toString(
749
749
750
750
if (is_array ($ value )) {
751
751
$ 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 ;
760
760
} elseif (is_object ($ value )) {
761
761
$ string .= $ keyStr . 'Object( ' . get_class ($ value ) . ') ' . $ separator ;
762
762
} elseif (is_resource ($ value )) {
0 commit comments