Skip to content

Commit ce8bff4

Browse files
authored
Change default parameter type to mixed in regexp methods
1 parent d0ad8d1 commit ce8bff4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Validators.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,11 +708,11 @@ public static function contains(mixed $val, array|int|string $needle): bool
708708
*
709709
* @param string|numeric $val 要验证的数据
710710
* @param string $regexp 正则表达式 "/^M(.*)/"
711-
* @param null $default
711+
* @param mixed $default
712712
*
713713
* @return bool
714714
*/
715-
public static function regexp(float|int|string $val, string $regexp, null $default = null): bool
715+
public static function regexp(float|int|string $val, string $regexp, mixed $default = null): bool
716716
{
717717
$options = [
718718
'regexp' => $regexp
@@ -730,11 +730,11 @@ public static function regexp(float|int|string $val, string $regexp, null $defau
730730
*
731731
* @param string|numeric $val
732732
* @param string $regexp
733-
* @param null $default
733+
* @param mixed $default
734734
*
735735
* @return bool
736736
*/
737-
public static function regex(float|int|string $val, string $regexp, null $default = null): bool
737+
public static function regex(float|int|string $val, string $regexp, mixed $default = null): bool
738738
{
739739
return self::regexp($val, $regexp, $default);
740740
}

0 commit comments

Comments
 (0)