mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
DX: fix data type with new rules for phpstan
This commit is contained in:
parent
dc860d0c46
commit
68f56671a4
@ -52,7 +52,16 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface
|
||||
|
||||
public function hasLock(Document $document, RequestInterface $request): bool
|
||||
{
|
||||
return $this->redis->exists($this->getCacheId($document)) > 0;
|
||||
$r = $this->redis->exists($this->getCacheId($document));
|
||||
|
||||
if (is_bool($r)) {
|
||||
return $r;
|
||||
}
|
||||
if (is_int($r)) {
|
||||
return $r > 0;
|
||||
}
|
||||
|
||||
throw new \RuntimeException('data type not supported');
|
||||
}
|
||||
|
||||
public function setLock(Document $document, string $lockId, RequestInterface $request): bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user