Skip to content

Commit 0f6e153

Browse files
authored
Merge pull request #30915 from nextcloud/fix/psalm-composer-stable23
[stable23] Fix psalm warning related to registerEventListener
2 parents 77dec31 + 003f2b5 commit 0f6e153

File tree

2 files changed

+5
-106
lines changed

2 files changed

+5
-106
lines changed

build/psalm-baseline.xml

Lines changed: 4 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
<code>array</code>
3737
</LessSpecificImplementedReturnType>
3838
</file>
39-
<file src="apps/admin_audit/lib/AppInfo/Application.php">
40-
<InvalidArgument occurrences="1">
41-
<code>registerEventListener</code>
42-
</InvalidArgument>
43-
</file>
4439
<file src="apps/cloud_federation_api/lib/Controller/RequestHandlerController.php">
4540
<InvalidScalarArgument occurrences="1">
4641
<code>$e-&gt;getCode()</code>
@@ -49,12 +44,6 @@
4944
<code>!is_array($notification)</code>
5045
</TypeDoesNotContainType>
5146
</file>
52-
<file src="apps/comments/lib/AppInfo/Application.php">
53-
<InvalidArgument occurrences="2">
54-
<code>registerEventListener</code>
55-
<code>registerEventListener</code>
56-
</InvalidArgument>
57-
</file>
5847
<file src="apps/comments/lib/Search/Result.php">
5948
<InvalidScalarArgument occurrences="1">
6049
<code>(int) $comment-&gt;getId()</code>
@@ -65,11 +54,6 @@
6554
<code>\Sabre\Uri\split($this-&gt;principalUri)</code>
6655
</UndefinedFunction>
6756
</file>
68-
<file src="apps/contactsinteraction/lib/AppInfo/Application.php">
69-
<InvalidArgument occurrences="1">
70-
<code>registerEventListener</code>
71-
</InvalidArgument>
72-
</file>
7357
<file src="apps/dav/appinfo/v1/caldav.php">
7458
<TooManyArguments occurrences="1">
7559
<code>new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud')</code>
@@ -128,35 +112,8 @@
128112
</MissingFile>
129113
</file>
130114
<file src="apps/dav/lib/AppInfo/Application.php">
131-
<InvalidArgument occurrences="28">
132-
<code>registerEventListener</code>
133-
<code>registerEventListener</code>
134-
<code>registerEventListener</code>
135-
<code>registerEventListener</code>
136-
<code>registerEventListener</code>
137-
<code>registerEventListener</code>
138-
<code>registerEventListener</code>
139-
<code>registerEventListener</code>
140-
<code>registerEventListener</code>
141-
<code>registerEventListener</code>
142-
<code>registerEventListener</code>
143-
<code>registerEventListener</code>
144-
<code>registerEventListener</code>
145-
<code>registerEventListener</code>
146-
<code>registerEventListener</code>
147-
<code>registerEventListener</code>
148-
<code>registerEventListener</code>
149-
<code>registerEventListener</code>
150-
<code>registerEventListener</code>
151-
<code>registerEventListener</code>
152-
<code>registerEventListener</code>
153-
<code>registerEventListener</code>
154-
<code>registerEventListener</code>
155-
<code>registerEventListener</code>
156-
<code>registerEventListener</code>
157-
<code>registerEventListener</code>
158-
<code>registerEventListener</code>
159-
<code>registerEventListener</code>
115+
<InvalidArgument occurrences="1">
116+
<code>CalendarDeletionDefaultUpdaterListener::class</code>
160117
</InvalidArgument>
161118
<UndefinedInterfaceMethod occurrences="1">
162119
<code>getAppDataDir</code>
@@ -1155,11 +1112,6 @@
11551112
<code>$userSession</code>
11561113
</RedundantCondition>
11571114
</file>
1158-
<file src="apps/federatedfilesharing/lib/AppInfo/Application.php">
1159-
<InvalidArgument occurrences="1">
1160-
<code>registerEventListener</code>
1161-
</InvalidArgument>
1162-
</file>
11631115
<file src="apps/federatedfilesharing/lib/Controller/RequestHandlerController.php">
11641116
<InvalidScalarArgument occurrences="7">
11651117
<code>$id</code>
@@ -1214,11 +1166,6 @@
12141166
<code>null</code>
12151167
</NullableReturnStatement>
12161168
</file>
1217-
<file src="apps/federation/lib/AppInfo/Application.php">
1218-
<InvalidArgument occurrences="1">
1219-
<code>registerEventListener</code>
1220-
</InvalidArgument>
1221-
</file>
12221169
<file src="apps/federation/lib/TrustedServers.php">
12231170
<InvalidArgument occurrences="1">
12241171
<code>'OCP\Federation\TrustedServerEvent::remove'</code>
@@ -1263,12 +1210,6 @@
12631210
<code>10 * 1024 * 1024</code>
12641211
</InvalidScalarArgument>
12651212
</file>
1266-
<file src="apps/files/lib/AppInfo/Application.php">
1267-
<InvalidArgument occurrences="2">
1268-
<code>registerEventListener</code>
1269-
<code>registerEventListener</code>
1270-
</InvalidArgument>
1271-
</file>
12721213
<file src="apps/files/lib/Command/Scan.php">
12731214
<NullArgument occurrences="1">
12741215
<code>null</code>
@@ -1358,12 +1299,6 @@
13581299
<code>$this</code>
13591300
</InvalidScope>
13601301
</file>
1361-
<file src="apps/files_external/lib/AppInfo/Application.php">
1362-
<InvalidArgument occurrences="2">
1363-
<code>registerEventListener</code>
1364-
<code>registerEventListener</code>
1365-
</InvalidArgument>
1366-
</file>
13671302
<file src="apps/files_external/lib/Command/Delete.php">
13681303
<NullArgument occurrences="1">
13691304
<code>null</code>
@@ -1867,12 +1802,6 @@
18671802
<code>$this</code>
18681803
</InvalidScope>
18691804
</file>
1870-
<file src="apps/files_versions/lib/AppInfo/Application.php">
1871-
<InvalidArgument occurrences="2">
1872-
<code>registerEventListener</code>
1873-
<code>registerEventListener</code>
1874-
</InvalidArgument>
1875-
</file>
18761805
<file src="apps/files_versions/lib/Sabre/RestoreFolder.php">
18771806
<InvalidNullableReturnType occurrences="1">
18781807
<code>getChild</code>
@@ -1916,11 +1845,6 @@
19161845
<file src="apps/oauth2/lib/Db/ClientMapper.php">
19171846
<InvalidCatch occurrences="2"/>
19181847
</file>
1919-
<file src="apps/provisioning_api/lib/AppInfo/Application.php">
1920-
<InvalidArgument occurrences="1">
1921-
<code>registerEventListener</code>
1922-
</InvalidArgument>
1923-
</file>
19241848
<file src="apps/provisioning_api/lib/Controller/UsersController.php">
19251849
<InvalidScalarArgument occurrences="1">
19261850
<code>$quota</code>
@@ -1931,10 +1855,8 @@
19311855
</TypeDoesNotContainNull>
19321856
</file>
19331857
<file src="apps/settings/lib/AppInfo/Application.php">
1934-
<InvalidArgument occurrences="3">
1935-
<code>registerEventListener</code>
1936-
<code>registerEventListener</code>
1937-
<code>registerEventListener</code>
1858+
<InvalidArgument occurrences="1">
1859+
<code>AppPasswordCreatedActivityListener::class</code>
19381860
</InvalidArgument>
19391861
<InvalidScalarArgument occurrences="1">
19401862
<code>\OC_User::getUser()</code>
@@ -2021,11 +1943,6 @@
20211943
<code>$type</code>
20221944
</InvalidScalarArgument>
20231945
</file>
2024-
<file src="apps/theming/lib/AppInfo/Application.php">
2025-
<InvalidArgument occurrences="1">
2026-
<code>registerEventListener</code>
2027-
</InvalidArgument>
2028-
</file>
20291946
<file src="apps/theming/lib/Controller/IconController.php">
20301947
<InvalidReturnStatement occurrences="1">
20311948
<code>$response</code>
@@ -2066,14 +1983,6 @@
20661983
<code>$folder !== null</code>
20671984
</RedundantCondition>
20681985
</file>
2069-
<file src="apps/twofactor_backupcodes/lib/AppInfo/Application.php">
2070-
<InvalidArgument occurrences="4">
2071-
<code>registerEventListener</code>
2072-
<code>registerEventListener</code>
2073-
<code>registerEventListener</code>
2074-
<code>registerEventListener</code>
2075-
</InvalidArgument>
2076-
</file>
20771986
<file src="apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php">
20781987
<InvalidArgument occurrences="1">
20791988
<code>bool</code>
@@ -2416,20 +2325,10 @@
24162325
</TypeDoesNotContainType>
24172326
</file>
24182327
<file src="apps/user_status/lib/AppInfo/Application.php">
2419-
<InvalidArgument occurrences="3">
2420-
<code>registerEventListener</code>
2421-
<code>registerEventListener</code>
2422-
<code>registerEventListener</code>
2423-
</InvalidArgument>
24242328
<UndefinedInterfaceMethod occurrences="1">
24252329
<code>registerProvider</code>
24262330
</UndefinedInterfaceMethod>
24272331
</file>
2428-
<file src="apps/workflowengine/lib/AppInfo/Application.php">
2429-
<InvalidArgument occurrences="1">
2430-
<code>registerEventListener</code>
2431-
</InvalidArgument>
2432-
</file>
24332332
<file src="apps/workflowengine/lib/Check/AbstractStringCheck.php">
24342333
<NullArgument occurrences="1">
24352334
<code>null</code>

lib/public/AppFramework/Bootstrap/IRegistrationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function registerParameter(string $name, $value): void;
126126
* @param string $event preferably the fully-qualified class name of the Event sub class to listen for
127127
* @psalm-param string|class-string<T> $event preferably the fully-qualified class name of the Event sub class to listen for
128128
* @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container
129-
* @psalm-param class-string<\OCP\EventDispatcher\IEventListener<T>> $listener fully qualified class name that can be built by the DI container
129+
* @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container
130130
* @param int $priority The higher this value, the earlier an event
131131
* listener will be triggered in the chain (defaults to 0)
132132
*

0 commit comments

Comments
 (0)