Skip to content

Commit 01ff860

Browse files
authored
Update Str.php
1 parent cde3fb3 commit 01ff860

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Str.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ final class Str implements StringInterface
2222
* Create a string from a string value
2323
*
2424
* @param string|Stringable $string Initial string value
25-
* @param string $encoding Character encoding to use
25+
* @param ?string $encoding Character encoding to use
2626
* @return self New string instance
2727
*/
28-
public static function from(string|Stringable $string, string $encoding = 'UTF-8'): self
28+
public static function from(string|Stringable $string, ?string $encoding = null): self
2929
{
3030
return new self($string, $encoding);
3131
}

0 commit comments

Comments
 (0)