diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-03-18 15:32:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-18 15:32:39 +0100 |
commit | 570f3c77989120d92efbbd7a8bc5ad39288d7222 (patch) | |
tree | 2d81f278347a5c56a158e6853648dffb3a8a404e | |
parent | ca54813cbb8f4c6ab6395ef921f3de3d4a834bb3 (diff) | |
parent | b3780bcedd9d1fd8f92e7a3f3348ebe47f27aa04 (diff) | |
download | nextcloud-server-570f3c77989120d92efbbd7a8bc5ad39288d7222.tar.gz nextcloud-server-570f3c77989120d92efbbd7a8bc5ad39288d7222.zip |
Merge pull request #20003 from nextcloud/enh/19989/type-additional-scoes
Annotate $additionalScopes so the IDE knows what type $scopeCandidate is
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 4 | ||||
-rw-r--r-- | apps/workflowengine/lib/Service/RuleMatcher.php | 2 |
2 files changed, 5 insertions, 1 deletions
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; } |