summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-14 13:00:20 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-14 15:40:12 +0200
commitf464ef050bd329f8cac3bb20c932e2021ab49d37 (patch)
treedcdb02e6b8aed1f13d7549e0a82b33c12a787a4c
parentf9f20b63f4d98bd316f03b35ca3c3222aa333d49 (diff)
downloadnextcloud-server-f464ef050bd329f8cac3bb20c932e2021ab49d37.tar.gz
nextcloud-server-f464ef050bd329f8cac3bb20c932e2021ab49d37.zip
Fix type errors detected by Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/workflowengine/lib/Manager.php2
-rw-r--r--lib/base.php1
-rw-r--r--lib/private/AppFramework/App.php9
-rw-r--r--lib/private/Collaboration/Collaborators/Search.php4
4 files changed, 11 insertions, 5 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index e93ad24b3ab..c949e7f36f7 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -695,7 +695,7 @@ class Manager implements IManager {
}
/**
- * @return IEntity[]
+ * @return ICheck[]
*/
protected function getBuildInChecks(): array {
try {
diff --git a/lib/base.php b/lib/base.php
index bb9b8963419..a27e8ffc920 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -859,6 +859,7 @@ class OC {
}
private static function registerAppRestrictionsHooks() {
+ /** @var \OC\Group\Manager $groupManager */
$groupManager = self::$server->query(\OCP\IGroupManager::class);
$groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) {
$appManager = self::$server->getAppManager();
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index d93849a6db6..d6bf7bc81c3 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -34,6 +34,7 @@ namespace OC\AppFramework;
use OC\AppFramework\DependencyInjection\DIContainer;
use OC\AppFramework\Http\Dispatcher;
+use OC\AppFramework\Http\Request;
use OC\HintException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\ICallbackResponse;
@@ -114,9 +115,13 @@ class App {
*/
public static function main(string $controllerName, string $methodName, DIContainer $container, array $urlParams = null) {
if (!is_null($urlParams)) {
- $container->query(IRequest::class)->setUrlParameters($urlParams);
+ /** @var Request $request */
+ $request = $container->query(IRequest::class);
+ $request->setUrlParameters($urlParams);
} elseif (isset($container['urlParams']) && !is_null($container['urlParams'])) {
- $container->query(IRequest::class)->setUrlParameters($container['urlParams']);
+ /** @var Request $request */
+ $request = $container->query(IRequest::class);
+ $request->setUrlParameters($container['urlParams']);
}
$appName = $container['AppName'];
diff --git a/lib/private/Collaboration/Collaborators/Search.php b/lib/private/Collaboration/Collaborators/Search.php
index e7773858e5c..1e0fd739793 100644
--- a/lib/private/Collaboration/Collaborators/Search.php
+++ b/lib/private/Collaboration/Collaborators/Search.php
@@ -68,14 +68,14 @@ class Search implements ISearch {
foreach ($this->pluginList[$type] as $plugin) {
/** @var ISearchPlugin $searchPlugin */
$searchPlugin = $this->c->resolve($plugin);
- $hasMoreResults |= $searchPlugin->search($search, $limit, $offset, $searchResult);
+ $hasMoreResults = $searchPlugin->search($search, $limit, $offset, $searchResult) || $hasMoreResults;
}
}
// Get from lookup server, not a separate share type
if ($lookup) {
$searchPlugin = $this->c->resolve(LookupPlugin::class);
- $hasMoreResults |= $searchPlugin->search($search, $limit, $offset, $searchResult);
+ $hasMoreResults = $searchPlugin->search($search, $limit, $offset, $searchResult) || $hasMoreResults;
}
// sanitizing, could go into the plugins as well