Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Db/Option.php2
-rw-r--r--lib/Db/Poll.php10
-rw-r--r--lib/Helper/Container.php2
-rw-r--r--lib/Provider/ResourceProvider.php2
-rw-r--r--psalm-baseline.xml6
5 files changed, 19 insertions, 3 deletions
diff --git a/lib/Db/Option.php b/lib/Db/Option.php
index 930c6a89..1a1b3d1f 100644
--- a/lib/Db/Option.php
+++ b/lib/Db/Option.php
@@ -177,7 +177,7 @@ class Option extends Entity implements JsonSerializable {
$this->setOwner($userId);
}
- // used for 1.9.0-beta1 installtions
+ // used for 1.9.0-beta1 installations
public function getOwner() : string {
if ($this->owner === 'disallow' || $this->owner === null) {
return '';
diff --git a/lib/Db/Poll.php b/lib/Db/Poll.php
index 3ba05f40..dd14a8d3 100644
--- a/lib/Db/Poll.php
+++ b/lib/Db/Poll.php
@@ -271,6 +271,16 @@ class Poll extends Entity implements JsonSerializable {
return $this->getId();
}
+ // alias of getOwner()
+ public function getUserId() : string {
+ return $this->getOwner();
+ }
+
+ // alias of setOwner($value)
+ public function setUserId(string $userId) : void {
+ $this->setOwner($userId);
+ }
+
public function getProposalsExpired(): bool {
return (
$this->getProposalsExpire() > 0
diff --git a/lib/Helper/Container.php b/lib/Helper/Container.php
index 6ede5f1a..5edd624d 100644
--- a/lib/Helper/Container.php
+++ b/lib/Helper/Container.php
@@ -39,7 +39,7 @@ abstract class Container {
}
public static function queryClass(string $class) {
- return self::getContainer()->query($class);
+ return self::getContainer()->get($class);
}
public static function queryPoll(int $pollId) : Poll {
diff --git a/lib/Provider/ResourceProvider.php b/lib/Provider/ResourceProvider.php
index 1f8177dd..042c3c98 100644
--- a/lib/Provider/ResourceProvider.php
+++ b/lib/Provider/ResourceProvider.php
@@ -93,7 +93,7 @@ class ResourceProvider implements IProvider {
return true;
}
- public function invalidateAccessCache($pollId = null) {
+ public function invalidateAccessCache($pollId = null): void {
if ($pollId !== null) {
$resource = $this->resourceManager->getResourceForUser(self::RESOURCE_TYPE, (string)$pollId, null);
$this->resourceManager->invalidateAccessCacheForResource($resource);
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index b3bc22f6..64355c64 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -28,6 +28,12 @@
<code>registerEventListener</code>
</InvalidArgument>
</file>
+ <file src="lib/Db/Preferences.php">
+ <UndefinedClass occurrences="2">
+ <code>BackgroundService</code>
+ <code>BackgroundService</code>
+ </UndefinedClass>
+ </file>
<file src="lib/Listener/BaseListener.php">
<UndefinedMethod occurrences="10">
<code>getActivityId</code>