Skip to content

Commit caac7c7

Browse files
kesselbSebastianKrupinski
authored andcommitted
chore: update psalm baseline
- suppress missing isEnabled for calendar widget - remove stale entries Signed-off-by: Daniel Kesselberg <[email protected]> fix: do not show hidden calendars Signed-off-by: SebastianKrupinski <[email protected]>
1 parent 9f5cd1e commit caac7c7

3 files changed

Lines changed: 14 additions & 25 deletions

File tree

REUSE.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,9 @@ path = "composer/autoload.php"
7070
precedence = "aggregate"
7171
SPDX-FileCopyrightText = "Nils Adermann, Jordi Boggiano"
7272
SPDX-License-Identifier = "MIT"
73+
74+
[[annotations]]
75+
path = ["tests/psalm-baseline.xml"]
76+
precedence = "aggregate"
77+
SPDX-FileCopyrightText = "2023 Nextcloud GmbH and Nextcloud contributors"
78+
SPDX-License-Identifier = "AGPL-3.0-or-later"

lib/Dashboard/CalendarWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7):
133133
];
134134
$widgetItems = [];
135135
foreach ($calendars as $calendar) {
136-
if (interface_exists(ICalendarIsEnabled::class) && $calendar instanceof ICalendarIsEnabled && $calendar->isEnabled() === false) {
136+
if (method_exists($calendar, 'isEnabled') && $calendar->isEnabled() === false) {
137137
continue;
138138
}
139139
if ($calendar->isDeleted()) {

tests/psalm-baseline.xml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
- SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
4-
- SPDX-License-Identifier: AGPL-3.0-or-later
5-
-->
6-
<files psalm-version="5.19.0@06b71be009a6bd6d81b9811855d6629b9fe90e1b">
2+
<files psalm-version="6.10.3@90b5b9f5e7c8e441b191d3c82c58214753d7c7c1">
73
<file src="lib/AppInfo/Application.php">
8-
<MissingDependency>
9-
<code>CalendarWidgetV2</code>
10-
</MissingDependency>
114
<UndefinedClass>
12-
<code>IAPIWidgetV2</code>
135
<code><![CDATA[ServerVersion]]></code>
146
</UndefinedClass>
157
<UndefinedDocblockClass>
@@ -19,27 +11,18 @@
1911
</file>
2012
<file src="lib/Controller/AppointmentConfigController.php">
2113
<RedundantCondition>
22-
<code>$expectedDayKeys !== $actualDayKeys</code>
14+
<code><![CDATA[$expectedDayKeys !== $actualDayKeys]]></code>
2315
<code><![CDATA[$slotKeys !== ['end', 'start']]]></code>
2416
</RedundantCondition>
25-
<UndefinedAttributeClass>
26-
<code>UserRateLimit</code>
27-
</UndefinedAttributeClass>
2817
</file>
29-
<file src="lib/Controller/BookingController.php">
30-
<UndefinedAttributeClass>
31-
<code>AnonRateLimit</code>
32-
<code>UserRateLimit</code>
33-
</UndefinedAttributeClass>
34-
</file>
35-
<file src="lib/Dashboard/CalendarWidgetV2.php">
36-
<UndefinedClass>
37-
<code>IAPIWidgetV2</code>
38-
</UndefinedClass>
18+
<file src="lib/Dashboard/CalendarWidget.php">
19+
<UndefinedInterfaceMethod>
20+
<code><![CDATA[isEnabled]]></code>
21+
</UndefinedInterfaceMethod>
3922
</file>
4023
<file src="lib/Listener/AppointmentBookedListener.php">
4124
<MissingTemplateParam>
42-
<code>IEventListener</code>
25+
<code><![CDATA[IEventListener]]></code>
4326
</MissingTemplateParam>
4427
</file>
4528
</files>

0 commit comments

Comments
 (0)