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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-29 14:44:02 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-01-29 14:44:02 +0300
commit003f2b59c92fa5a9455ddacea11ee0d66c828f5b (patch)
treefd510951e85c071479b160e45de35e8c5352a0cc
parente69281c66faec110af41ee63acb1c1168209d92f (diff)
Fix psalm warning related to registerEventListener
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
-rw-r--r--build/psalm-baseline.xml109
-rw-r--r--lib/public/AppFramework/Bootstrap/IRegistrationContext.php2
2 files changed, 5 insertions, 106 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index efa8e657da5..cad8e6a1c06 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -36,11 +36,6 @@
<code>array</code>
</LessSpecificImplementedReturnType>
</file>
- <file src="apps/admin_audit/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/cloud_federation_api/lib/Controller/RequestHandlerController.php">
<InvalidScalarArgument occurrences="1">
<code>$e-&gt;getCode()</code>
@@ -49,12 +44,6 @@
<code>!is_array($notification)</code>
</TypeDoesNotContainType>
</file>
- <file src="apps/comments/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="2">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/comments/lib/Search/Result.php">
<InvalidScalarArgument occurrences="1">
<code>(int) $comment-&gt;getId()</code>
@@ -65,11 +54,6 @@
<code>\Sabre\Uri\split($this-&gt;principalUri)</code>
</UndefinedFunction>
</file>
- <file src="apps/contactsinteraction/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/dav/appinfo/v1/caldav.php">
<TooManyArguments occurrences="1">
<code>new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud')</code>
@@ -128,35 +112,8 @@
</MissingFile>
</file>
<file src="apps/dav/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="28">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
+ <InvalidArgument occurrences="1">
+ <code>CalendarDeletionDefaultUpdaterListener::class</code>
</InvalidArgument>
<UndefinedInterfaceMethod occurrences="1">
<code>getAppDataDir</code>
@@ -1155,11 +1112,6 @@
<code>$userSession</code>
</RedundantCondition>
</file>
- <file src="apps/federatedfilesharing/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/federatedfilesharing/lib/Controller/RequestHandlerController.php">
<InvalidScalarArgument occurrences="7">
<code>$id</code>
@@ -1214,11 +1166,6 @@
<code>null</code>
</NullableReturnStatement>
</file>
- <file src="apps/federation/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/federation/lib/TrustedServers.php">
<InvalidArgument occurrences="1">
<code>'OCP\Federation\TrustedServerEvent::remove'</code>
@@ -1263,12 +1210,6 @@
<code>10 * 1024 * 1024</code>
</InvalidScalarArgument>
</file>
- <file src="apps/files/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="2">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/files/lib/Command/Scan.php">
<NullArgument occurrences="1">
<code>null</code>
@@ -1358,12 +1299,6 @@
<code>$this</code>
</InvalidScope>
</file>
- <file src="apps/files_external/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="2">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/files_external/lib/Command/Delete.php">
<NullArgument occurrences="1">
<code>null</code>
@@ -1867,12 +1802,6 @@
<code>$this</code>
</InvalidScope>
</file>
- <file src="apps/files_versions/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="2">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/files_versions/lib/Sabre/RestoreFolder.php">
<InvalidNullableReturnType occurrences="1">
<code>getChild</code>
@@ -1916,11 +1845,6 @@
<file src="apps/oauth2/lib/Db/ClientMapper.php">
<InvalidCatch occurrences="2"/>
</file>
- <file src="apps/provisioning_api/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/provisioning_api/lib/Controller/UsersController.php">
<InvalidScalarArgument occurrences="1">
<code>$quota</code>
@@ -1931,10 +1855,8 @@
</TypeDoesNotContainNull>
</file>
<file src="apps/settings/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="3">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
+ <InvalidArgument occurrences="1">
+ <code>AppPasswordCreatedActivityListener::class</code>
</InvalidArgument>
<InvalidScalarArgument occurrences="1">
<code>\OC_User::getUser()</code>
@@ -2021,11 +1943,6 @@
<code>$type</code>
</InvalidScalarArgument>
</file>
- <file src="apps/theming/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/theming/lib/Controller/IconController.php">
<InvalidReturnStatement occurrences="1">
<code>$response</code>
@@ -2066,14 +1983,6 @@
<code>$folder !== null</code>
</RedundantCondition>
</file>
- <file src="apps/twofactor_backupcodes/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="4">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php">
<InvalidArgument occurrences="1">
<code>bool</code>
@@ -2416,20 +2325,10 @@
</TypeDoesNotContainType>
</file>
<file src="apps/user_status/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="3">
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- <code>registerEventListener</code>
- </InvalidArgument>
<UndefinedInterfaceMethod occurrences="1">
<code>registerProvider</code>
</UndefinedInterfaceMethod>
</file>
- <file src="apps/workflowengine/lib/AppInfo/Application.php">
- <InvalidArgument occurrences="1">
- <code>registerEventListener</code>
- </InvalidArgument>
- </file>
<file src="apps/workflowengine/lib/Check/AbstractStringCheck.php">
<NullArgument occurrences="1">
<code>null</code>
diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
index 4e895b73b3d..14914769e19 100644
--- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
+++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php
@@ -126,7 +126,7 @@ interface IRegistrationContext {
* @param string $event preferably the fully-qualified class name of the Event sub class to listen for
* @psalm-param string|class-string<T> $event preferably the fully-qualified class name of the Event sub class to listen for
* @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container
- * @psalm-param class-string<\OCP\EventDispatcher\IEventListener<T>> $listener fully qualified class name that can be built by the DI container
+ * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container
* @param int $priority The higher this value, the earlier an event
* listener will be triggered in the chain (defaults to 0)
*