Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonej committed Sep 2, 2023
1 parent 0e30a81 commit 5fdcd80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Illuminate/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ public static function createUlidsNormally()
/**
* Set the callable that will be used to generate ULIDs.
*
* @param callable|null $factory
* @param callable|null $factory
* @return void
*/
public static function createUlidsUsing(callable $factory = null)
Expand All @@ -1585,8 +1585,8 @@ public static function createUlidsUsing(callable $factory = null)
/**
* Set the sequence that will be used to generate ULIDs.
*
* @param array $sequence
* @param callable|null $whenMissing
* @param array $sequence
* @param callable|null $whenMissing
* @return void
*/
public static function createUlidsUsingSequence(array $sequence, $whenMissing = null)
Expand Down Expand Up @@ -1619,14 +1619,14 @@ public static function createUlidsUsingSequence(array $sequence, $whenMissing =
/**
* Always return the same ULID when generating new ULIDs.
*
* @param Closure|null $callback
* @param Closure|null $callback
* @return Ulid
*/
public static function freezeUlids(Closure $callback = null)
{
$ulid = Str::ulid();

Str::createUlidsUsing(fn() => $ulid);
Str::createUlidsUsing(fn () => $ulid);

if ($callback !== null) {
try {
Expand Down
4 changes: 2 additions & 2 deletions tests/Support/SupportStrTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ public function testItCreatesUlidsNormallyAfterFailureWithinFreezeMethod()
{
try {
Str::freezeUlids(function () {
Str::createUlidsUsing(fn() => Str::of('1234'));
Str::createUlidsUsing(fn () => Str::of('1234'));
$this->assertSame('1234', (string) Str::ulid());
throw new \Exception('Something failed');
});
Expand Down Expand Up @@ -1246,7 +1246,7 @@ public function testItCanSpecifyAFallbackForAUlidSequence()
{
Str::createUlidsUsingSequence(
[Str::ulid(), Str::ulid()],
fn() => throw new Exception('Out of Ulids'),
fn () => throw new Exception('Out of Ulids'),
);
Str::ulid();
Str::ulid();
Expand Down

0 comments on commit 5fdcd80

Please sign in to comment.