Skip to content

Commit 465153d

Browse files
committed
Updated
1 parent 7fc021f commit 465153d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/UnicodeString.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public function insert($text, int $offset, int $mode = self::KEEP_CASE): self
468468
* @param int|null $length
469469
* @return static
470470
*/
471-
public function remove(int $offset, int $length = null): self
471+
public function remove(int $offset, ?int $length = null): self
472472
{
473473
$codes = $this->codes;
474474

@@ -657,7 +657,7 @@ public function split($delimiter = '', bool $ignoreCase = false): array
657657
* @param int|null $length
658658
* @return static
659659
*/
660-
public function substring(int $start, int $length = null): self
660+
public function substring(int $start, ?int $length = null): self
661661
{
662662
return new static(array_slice($this->codes, $start, $length));
663663
}
@@ -952,7 +952,7 @@ public function __unserialize(array $data): void
952952
* @return static
953953
* @throws InvalidStringException
954954
*/
955-
public static function from(string $string, string $encoding = null, int $mode = self::KEEP_CASE): self
955+
public static function from(string $string, ?string $encoding = null, int $mode = self::KEEP_CASE): self
956956
{
957957
if ($encoding !== null && strcasecmp($encoding, 'UTF-8') !== 0) {
958958
if (false === $string = @iconv($encoding, 'UTF-8', $string)) {

0 commit comments

Comments
 (0)