File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ public function testCreateLock()
3535 $ keys [] = $ key ;
3636
3737 return true ;
38- }))
39- ->willReturn (true );
38+ }));
4039
4140 $ logger = $ this ->createMock (LoggerInterface::class);
4241 $ factory = new LockFactory ($ store );
@@ -65,8 +64,7 @@ public function testCreateLockFromKey()
6564 $ keys [] = $ key ;
6665
6766 return true ;
68- }))
69- ->willReturn (true );
67+ }));
7068
7169 $ logger = $ this ->createMock (LoggerInterface::class);
7270 $ factory = new LockFactory ($ store );
Original file line number Diff line number Diff line change @@ -516,16 +516,14 @@ public function testAcquireTwiceWithExpiration()
516516 private $ keys = [];
517517 private $ initialTtl = 30 ;
518518
519- public function save (Key $ key )
519+ public function save (Key $ key ): void
520520 {
521521 $ key ->reduceLifetime ($ this ->initialTtl );
522522 $ this ->keys [spl_object_hash ($ key )] = $ key ;
523523 $ this ->checkNotExpired ($ key );
524-
525- return true ;
526524 }
527525
528- public function delete (Key $ key )
526+ public function delete (Key $ key ): void
529527 {
530528 unset($ this ->keys [spl_object_hash ($ key )]);
531529 }
@@ -535,7 +533,7 @@ public function exists(Key $key): bool
535533 return isset ($ this ->keys [spl_object_hash ($ key )]);
536534 }
537535
538- public function putOffExpiration (Key $ key , $ ttl )
536+ public function putOffExpiration (Key $ key , $ ttl ): void
539537 {
540538 $ key ->reduceLifetime ($ ttl );
541539 $ this ->checkNotExpired ($ key );
You can’t perform that action at this time.
0 commit comments