From: Daniel Kesselberg Date: Tue, 17 Mar 2020 14:23:59 +0000 (+0100) Subject: Annotate $additionalScopes so the IDE knows what type $scopeCandidate is. X-Git-Tag: v19.0.0beta1~93^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F20003%2Fhead;p=nextcloud-server.git Annotate $additionalScopes so the IDE knows what type $scopeCandidate is. Signed-off-by: Daniel Kesselberg --- diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index 2818238081e..1829bee300f 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -163,6 +163,10 @@ class Manager implements IManager { return $operations; } + /** + * @param string $operationClass + * @return ScopeContext[] + */ public function getAllConfiguredScopesForOperation(string $operationClass): array { static $scopesByOperation = []; if (isset($scopesByOperation[$operationClass])) { diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index 99a5db8a9d0..70c40e1251a 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -134,9 +134,9 @@ class RuleMatcher implements IRuleMatcher { } if($this->entity instanceof IEntity) { + /** @var ScopeContext[] $additionalScopes */ $additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class); foreach ($additionalScopes as $hash => $scopeCandidate) { - /** @var ScopeContext $scopeCandidate */ if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) { continue; }