diff --git a/src/StringHelper.php b/src/StringHelper.php index bb5e549f..dfc43063 100644 --- a/src/StringHelper.php +++ b/src/StringHelper.php @@ -462,7 +462,7 @@ public static function strcmp($str1, $str2, $locale = false) * @link https://www.php.net/strcspn * @since 1.3.0 */ - public static function strcspn(string $str, string $mask, $start = null, $length = null) + public static function strcspn($str, $mask, $start = null, $length = null) { if (strlen($mask) == 0) { return 0; @@ -535,7 +535,7 @@ public static function strrev($str) * @link https://www.php.net/strspn * @since 1.3.0 */ - public static function strspn(string $str, string $mask, ?int $start = null, ?int $length = null) + public static function strspn($str, $mask, $start = null, $length = null) { $mask = preg_replace('!([\\\\\\-\\]\\[/^])!', '\\\${1}', $mask);