diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-03 12:15:24 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-12 16:06:18 +0300 |
commit | ec6b83cc1891214c7fa3a236626807b4335f9a2f (patch) | |
tree | b5f12993172528ddec15b7b8ae6a09a0080fedd7 /apps/workflowengine | |
parent | 5a0b28d603e142051967175f023b698ff7e262db (diff) |
Add stricter psalm type for CappedMemoryCachecleanup/cappedmemorycache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/workflowengine')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index 34dbf507b91..f6c3e3086c2 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -109,8 +109,8 @@ class Manager implements IManager { /** @var ILogger */ protected $logger; - /** @var CappedMemoryCache */ - protected $operationsByScope = []; + /** @var CappedMemoryCache<int[]> */ + protected CappedMemoryCache $operationsByScope; /** @var IUserSession */ protected $session; @@ -350,10 +350,11 @@ class Manager implements IManager { $qb->setParameters(['scope' => $scopeContext->getScope(), 'scopeId' => $scopeContext->getScopeId()]); $result = $qb->execute(); - $this->operationsByScope[$scopeContext->getHash()] = []; + $operations = []; while (($opId = $result->fetchOne()) !== false) { - $this->operationsByScope[$scopeContext->getHash()][] = (int)$opId; + $operations[] = (int)$opId; } + $this->operationsByScope[$scopeContext->getHash()] = $operations; $result->closeCursor(); return in_array($id, $this->operationsByScope[$scopeContext->getHash()], true); |