Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Aug 1, 2024
1 parent 50bf66e commit bff15b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"phpunit/phpunit": "^10.0|^11.2",
"brainmaestro/composer-git-hooks": "^3.0",
"friendsofphp/php-cs-fixer": "^3.2",
"nunomaduro/termwind": "^2.0",
"nunomaduro/termwind": "^1.0|^2.0",
"laravel/pint": "^1.10"
},
"bin": [
Expand Down
4 changes: 1 addition & 3 deletions src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class Collection implements ArrayAccess, JsonSerializable, Stringable
{
public function __construct(protected $items = [])
{
}
public function __construct(protected $items = []) {}

public function join(string $separator = ' '): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct()

public static function make(): static
{
return new static();
return new static;
}

public function heteronym(bool $asList = false): static
Expand Down Expand Up @@ -175,7 +175,7 @@ public function when(bool $condition, callable $callback): static
return $this;
}

public function convert(string $string, callable $beforeSplit = null): Collection
public function convert(string $string, ?callable $beforeSplit = null): Collection
{
// 把原有的数字和汉字分离,避免拼音转换时被误作声调
$string = preg_replace_callback('~[a-z0-9_-]+~i', function ($matches) {
Expand Down

0 comments on commit bff15b2

Please sign in to comment.