Skip to content

Commit f464ef0

Browse files
Fix type errors detected by Psalm
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent f9f20b6 commit f464ef0

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

apps/workflowengine/lib/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ protected function getBuildInOperators(): array {
695695
}
696696

697697
/**
698-
* @return IEntity[]
698+
* @return ICheck[]
699699
*/
700700
protected function getBuildInChecks(): array {
701701
try {

lib/base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ private static function registerAccountHooks() {
859859
}
860860

861861
private static function registerAppRestrictionsHooks() {
862+
/** @var \OC\Group\Manager $groupManager */
862863
$groupManager = self::$server->query(\OCP\IGroupManager::class);
863864
$groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) {
864865
$appManager = self::$server->getAppManager();

lib/private/AppFramework/App.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
use OC\AppFramework\DependencyInjection\DIContainer;
3636
use OC\AppFramework\Http\Dispatcher;
37+
use OC\AppFramework\Http\Request;
3738
use OC\HintException;
3839
use OCP\AppFramework\Http;
3940
use OCP\AppFramework\Http\ICallbackResponse;
@@ -114,9 +115,13 @@ public static function getAppIdForClass(string $className, string $topNamespace
114115
*/
115116
public static function main(string $controllerName, string $methodName, DIContainer $container, array $urlParams = null) {
116117
if (!is_null($urlParams)) {
117-
$container->query(IRequest::class)->setUrlParameters($urlParams);
118+
/** @var Request $request */
119+
$request = $container->query(IRequest::class);
120+
$request->setUrlParameters($urlParams);
118121
} elseif (isset($container['urlParams']) && !is_null($container['urlParams'])) {
119-
$container->query(IRequest::class)->setUrlParameters($container['urlParams']);
122+
/** @var Request $request */
123+
$request = $container->query(IRequest::class);
124+
$request->setUrlParameters($container['urlParams']);
120125
}
121126
$appName = $container['AppName'];
122127

lib/private/Collaboration/Collaborators/Search.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public function search($search, array $shareTypes, $lookup, $limit, $offset) {
6868
foreach ($this->pluginList[$type] as $plugin) {
6969
/** @var ISearchPlugin $searchPlugin */
7070
$searchPlugin = $this->c->resolve($plugin);
71-
$hasMoreResults |= $searchPlugin->search($search, $limit, $offset, $searchResult);
71+
$hasMoreResults = $searchPlugin->search($search, $limit, $offset, $searchResult) || $hasMoreResults;
7272
}
7373
}
7474

7575
// Get from lookup server, not a separate share type
7676
if ($lookup) {
7777
$searchPlugin = $this->c->resolve(LookupPlugin::class);
78-
$hasMoreResults |= $searchPlugin->search($search, $limit, $offset, $searchResult);
78+
$hasMoreResults = $searchPlugin->search($search, $limit, $offset, $searchResult) || $hasMoreResults;
7979
}
8080

8181
// sanitizing, could go into the plugins as well

0 commit comments

Comments
 (0)