diff --git a/composer.json b/composer.json
index 6b59429c..ead4d519 100644
--- a/composer.json
+++ b/composer.json
@@ -22,6 +22,7 @@
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline",
+ "psalm:update-baseline:force": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
"test:unit": "vendor/bin/phpunit -c phpunit.xml"
diff --git a/lib/FilteredNavigationManager.php b/lib/FilteredNavigationManager.php
index b56edfb2..650b6a38 100644
--- a/lib/FilteredNavigationManager.php
+++ b/lib/FilteredNavigationManager.php
@@ -8,22 +8,16 @@
namespace OCA\Guests;
use OC\NavigationManager;
+use OCP\INavigationManager;
use OCP\IUser;
class FilteredNavigationManager extends NavigationManager {
- /** @var AppWhitelist */
- private $whitelist;
- /** @var IUser */
- private $user;
-
- /** @var NavigationManager */
- private $navigationManager;
-
- public function __construct(IUser $user, NavigationManager $navigationManager, AppWhitelist $whitelist) {
- $this->whitelist = $whitelist;
- $this->user = $user;
- $this->navigationManager = $navigationManager;
+ public function __construct(
+ private IUser $user,
+ private INavigationManager $navigationManager,
+ private AppWhitelist $whitelist,
+ ) {
}
public function getAll(string $type = 'link'): array {
@@ -56,14 +50,23 @@ public function setUnreadCounter(string $id, int $unreadCounter): void {
$this->navigationManager->setUnreadCounter($id, $unreadCounter);
}
+ /**
+ * @psalm-suppress MethodSignatureMismatch
+ */
public function get(string $id): ?array {
return $this->navigationManager->get($id);
}
+ /**
+ * @psalm-suppress MethodSignatureMismatch
+ */
public function getDefaultEntryIdForUser(?IUser $user = null, bool $withFallbacks = true): string {
return $this->navigationManager->getDefaultEntryIdForUser($user, $withFallbacks);
}
+ /**
+ * @psalm-suppress MethodSignatureMismatch
+ */
public function getDefaultEntryIds(bool $withFallbacks = true): array {
return $this->navigationManager->getDefaultEntryIds($withFallbacks);
}
diff --git a/lib/Storage/DirMask.php b/lib/Storage/DirMask.php
index ef59f8a6..4e43c060 100644
--- a/lib/Storage/DirMask.php
+++ b/lib/Storage/DirMask.php
@@ -44,7 +44,7 @@ public function __construct($arguments) {
$this->mask = $arguments['mask'];
}
- protected function checkPath($path): bool {
+ protected function checkPath(string $path): bool {
return $path === $this->path || substr($path, 0, $this->pathLength + 1) === $this->path . '/';
}
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index 11939669..0c21b50a 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -9,9 +9,4 @@
-
-
-
-
-
diff --git a/tests/stub.php b/tests/stub.php
index 35b166d1..0a711f6b 100644
--- a/tests/stub.php
+++ b/tests/stub.php
@@ -827,3 +827,8 @@ class LoadAdditionalScriptsEvent extends \OCP\EventDispatcher\Event {
class BeforeTemplateRenderedEvent extends Event {
}
}
+
+namespace OCA\Files_External\Config {
+ class ExternalMountPoint {
+ }
+}