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