summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2023-11-09 23:37:24 +0100
committerLouis Chemineau <louis@chmn.me>2023-11-09 23:37:24 +0100
commit925cf21d1bdfb8457162c9834390c04a75906282 (patch)
treecab7d9203acd0468111bf6eb0458ac3fb0d48f9f /tests
parenta6902c17d9c4b903287e65623ebf07a044d6d8a3 (diff)
Fix psalm
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'tests')
-rw-r--r--tests/psalm-baseline.xml15
-rw-r--r--tests/stub.phpstub24
2 files changed, 37 insertions, 2 deletions
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index 3e9dbb51..d8c4ea7b 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -8,7 +8,8 @@
</file>
<file src="lib/Controller/PageController.php">
<InvalidArgument occurrences="1">
- <code>new SearchQuery(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'systemtag', $tag-&gt;getName()), 0, 0, [], $user)</code>
+ <code>new SearchQuery(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'systemtag',
+ $tag-&gt;getName()), 0, 0, [], $user)</code>
</InvalidArgument>
<UndefinedClass occurrences="12">
<code>$e</code>
@@ -31,4 +32,14 @@
<code>LoadViewer</code>
</UndefinedClass>
</file>
-</files>
+ <file src="lib/AppInfo/Application.php">
+ <InvalidArgument occurrences="9">
+ <code>registerEventListener</code>
+ </InvalidArgument>
+ </file>
+ <file src="lib/Listener/SabrePluginAuthInitListener.php">
+ <UndefinedMethod occurrences="1">
+ <code>addBackend</code>
+ </UndefinedMethod>
+ </file>
+</files> \ No newline at end of file
diff --git a/tests/stub.phpstub b/tests/stub.phpstub
index 777f1a2f..7524366a 100644
--- a/tests/stub.phpstub
+++ b/tests/stub.phpstub
@@ -633,3 +633,27 @@ use OCP\EventDispatcher\Event;
class LoadSidebar extends Event {
}
+
+namespace OCA\DAV\Events;
+
+use OCP\EventDispatcher\Event;
+use Sabre\DAV\Server;
+
+/**
+ * @since 20.0.0
+ */
+class SabrePluginAuthInitEvent extends Event {
+
+ /** @var Server */
+ private $server;
+
+ /**
+ * @since 20.0.0
+ */
+ public function __construct(Server $server);
+
+ /**
+ * @since 20.0.0
+ */
+ public function getServer(): Server;
+}