Skip to content

Commit c8da3ba

Browse files
nikajorjikagithub-actions[bot]
authored andcommitted
Fix styling
1 parent f251306 commit c8da3ba

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/StoreManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public function create(): MessageStore
2626

2727
private function resolveCustomStore($driver, $resolvers): ?MessageStore
2828
{
29-
if (!isset($resolvers[$driver]) || !is_callable($resolvers[$driver])) {
29+
if (! isset($resolvers[$driver]) || ! is_callable($resolvers[$driver])) {
3030
return null;
3131
}
3232

3333
$store = $resolvers[$driver]();
34-
if (!$store instanceof MessageStore) {
34+
if (! $store instanceof MessageStore) {
3535
return null;
3636
}
3737

tests/Unit/StoreManagerTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
it('throws when an unknown driver is configured', function () {
1717
config(['inbox.store.driver' => 'foo']);
1818

19-
expect(fn() => (new StoreManager)->create())
19+
expect(fn () => (new StoreManager)->create())
2020
->toThrow(InvalidArgumentException::class);
2121
});
2222

2323
it('accepts a custom driver resolver via config', function () {
24-
$custom = new class implements MessageStore {
24+
$custom = new class implements MessageStore
25+
{
2526
public array $stored = [];
2627

2728
public function store(string $key, array $value): void
@@ -46,10 +47,11 @@ public function delete(string $key): void
4647

4748
public function update(string $key, array $value): ?array
4849
{
49-
if (!isset($this->stored[$key])) {
50+
if (! isset($this->stored[$key])) {
5051
return null;
5152
}
5253
$this->stored[$key] = array_merge($this->stored[$key], $value);
54+
5355
return $this->stored[$key];
5456
}
5557

@@ -61,11 +63,11 @@ public function purgeOlderThan(int $seconds): void
6163
public function clear(): bool
6264
{
6365
$this->stored = [];
66+
6467
return true;
6568
}
6669
};
6770

68-
6971
Config::set('inbox.store.driver', 'memory');
7072
Config::set('inbox.store.resolvers', [
7173
'memory' => fn () => $custom,

0 commit comments

Comments
 (0)