Skip to content

Commit 4ab4e84

Browse files
pulsarf0xicewind1991
authored andcommitted
fix: psalm errors on FilteredNavigationManager
Signed-off-by: Pascal Prugna <pascal@plumia.net>
1 parent 64eac5b commit 4ab4e84

4 files changed

Lines changed: 19 additions & 18 deletions

File tree

lib/FilteredNavigationManager.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,23 @@ public function setUnreadCounter(string $id, int $unreadCounter): void {
5050
$this->navigationManager->setUnreadCounter($id, $unreadCounter);
5151
}
5252

53+
/**
54+
* @psalm-suppress MethodSignatureMismatch
55+
*/
5356
public function get(string $id): ?array {
5457
return $this->navigationManager->get($id);
5558
}
5659

60+
/**
61+
* @psalm-suppress MethodSignatureMismatch
62+
*/
5763
public function getDefaultEntryIdForUser(?IUser $user = null, bool $withFallbacks = true): string {
5864
return $this->navigationManager->getDefaultEntryIdForUser($user, $withFallbacks);
5965
}
6066

67+
/**
68+
* @psalm-suppress MethodSignatureMismatch
69+
*/
6170
public function getDefaultEntryIds(bool $withFallbacks = true): array {
6271
return $this->navigationManager->getDefaultEntryIds($withFallbacks);
6372
}

lib/Storage/DirMask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function isUpdatable($path): bool {
5656
}
5757
}
5858

59-
public function isCreatable($path): bool {
59+
public function isCreatable(string $path): bool {
6060
if ($this->checkPath($path)) {
6161
return parent::isCreatable($path);
6262
} else {

tests/psalm-baseline.xml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,14 @@
44
- SPDX-License-Identifier: AGPL-3.0-or-later
55
-->
66
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
7-
<file src="lib/AppConfigOverwrite.php">
8-
<MethodSignatureMismatch>
9-
<code><![CDATA[public function getValue($app, $key, $default = null) {]]></code>
10-
</MethodSignatureMismatch>
11-
</file>
127
<file src="lib/AppInfo/Application.php">
138
<UndefinedInterfaceMethod>
149
<code><![CDATA[listen]]></code>
1510
</UndefinedInterfaceMethod>
1611
</file>
17-
<file src="lib/FilteredNavigationManager.php">
18-
<TooManyArguments>
19-
<code><![CDATA[getDefaultEntryIds]]></code>
20-
</TooManyArguments>
21-
<UndefinedInterfaceMethod>
22-
<code><![CDATA[clear]]></code>
23-
</UndefinedInterfaceMethod>
24-
</file>
25-
<file src="lib/RestrictionManager.php">
26-
<UndefinedClass>
27-
<code><![CDATA[ExternalMountPoint]]></code>
28-
</UndefinedClass>
12+
<file src="lib/Storage/DirMask.php">
13+
<MethodSignatureMismatch>
14+
<code><![CDATA[$path]]></code>
15+
</MethodSignatureMismatch>
2916
</file>
3017
</files>

tests/stub.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,3 +827,8 @@ class LoadAdditionalScriptsEvent extends \OCP\EventDispatcher\Event {
827827
class BeforeTemplateRenderedEvent extends Event {
828828
}
829829
}
830+
831+
namespace OCA\Files_External\Config {
832+
class ExternalMountPoint {
833+
}
834+
}

0 commit comments

Comments
 (0)