Skip to content

Commit 0ee282d

Browse files
a1383ngithub-actions[bot]
authored andcommitted
style: Fix code style issues
1 parent 7ef421e commit 0ee282d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Infrastructure/OneTimePassword/Support/CodeGenerator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
namespace LaravelAuthPro\Infrastructure\OneTimePassword\Support;
44

5-
use Illuminate\Contracts\Config\Repository;
65
use Illuminate\Support\Str;
76
use LaravelAuthPro\Contracts\Base\GeneratorInterface;
87
use LaravelAuthPro\Infrastructure\OneTimePassword\Enum\OneTimePasswordCodeType;
98

109
class CodeGenerator implements GeneratorInterface
1110
{
12-
public function __construct(protected readonly OneTimePasswordCodeType $type = OneTimePasswordCodeType::DIGIT, protected readonly int $length = 6, )
11+
public function __construct(protected readonly OneTimePasswordCodeType $type = OneTimePasswordCodeType::DIGIT, protected readonly int $length = 6)
1312
{
1413
//
1514
}

tests/Unit/ExampleTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
$generator = new CodeGenerator($type);
88

99
$values = collect(range(1, 16))
10-
->map(fn(int $i) => $i * 2)
11-
->mapWithKeys(fn(int $length) => [$length => $generator->generate($length)]);
10+
->map(fn (int $i) => $i * 2)
11+
->mapWithKeys(fn (int $length) => [$length => $generator->generate($length)]);
1212

1313
expect($values)
1414
->sequence(
15-
fn($code, $length) => $code->toHaveLength((int)$length->value),
16-
fn($code) => match ($type) {
15+
fn ($code, $length) => $code->toHaveLength((int)$length->value),
16+
fn ($code) => match ($type) {
1717
OneTimePasswordCodeType::DIGIT => $code->toBeDigits(),
1818
OneTimePasswordCodeType::ALPHA => $code->toBeAlpha(),
1919
}

0 commit comments

Comments
 (0)