Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/laravel-11' into laravel-11
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Mar 6, 2024
2 parents f4a7def + 878ae2c commit ed82bc4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

interface Generator
{
public function generate(string $prefix = null): string;
public function generate(?string $prefix = null): string;
}
2 changes: 1 addition & 1 deletion src/Contracts/HumanKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

interface HumanKeys
{
public function generate(string $prefix = null): string;
public function generate(?string $prefix = null): string;
}
2 changes: 1 addition & 1 deletion src/Generators/KsuidGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class KsuidGenerator implements Generator
{
public function generate(string $prefix = null): string
public function generate(?string $prefix = null): string
{
return implode('_', [
$prefix,
Expand Down
2 changes: 1 addition & 1 deletion src/Generators/SnowflakeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class SnowflakeGenerator implements Generator
{
public function generate(string $prefix = null): string
public function generate(?string $prefix = null): string
{
return implode('_', [
$prefix,
Expand Down
2 changes: 1 addition & 1 deletion src/HumanKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function __construct(protected string $generator)
{
}

public function generate(string $prefix = null): string
public function generate(?string $prefix = null): string
{
return GeneratorFactory::make($this->generator)->generator()->generate($prefix);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/GeneratorFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
test('custom generators can be used', function () {
$generator = new class implements GeneratorContract
{
public function generate(string $prefix = null): string
public function generate(?string $prefix = null): string
{
return "{$prefix}_foo";
}
Expand Down

0 comments on commit ed82bc4

Please sign in to comment.