fix(psalm): update baseline and suppress unnecessary issues

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
pull/32400/head
John Molakvoæ 11 months ago
parent 18399fc1cf
commit 9e4c9b97dd
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 7
      apps/dav/appinfo/v2/publicremote.php
  2. 6
      build/psalm-baseline.xml
  3. 4
      public.php

@ -109,13 +109,20 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authPlugin, funct
$fileId = $share->getNodeId(); $fileId = $share->getNodeId();
// FIXME: should not add storage wrappers outside of preSetup, need to find a better way // FIXME: should not add storage wrappers outside of preSetup, need to find a better way
/** @psalm-suppress InternalMethod */
$previousLog = Filesystem::logWarningWhenAddingStorageWrapper(false); $previousLog = Filesystem::logWarningWhenAddingStorageWrapper(false);
/** @psalm-suppress MissingClosureParamType */
Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) { Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
return new PermissionsMask(['storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE]); return new PermissionsMask(['storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE]);
}); });
/** @psalm-suppress MissingClosureParamType */
Filesystem::addStorageWrapper('shareOwner', function ($mountPoint, $storage) use ($share) { Filesystem::addStorageWrapper('shareOwner', function ($mountPoint, $storage) use ($share) {
return new PublicOwnerWrapper(['storage' => $storage, 'owner' => $share->getShareOwner()]); return new PublicOwnerWrapper(['storage' => $storage, 'owner' => $share->getShareOwner()]);
}); });
/** @psalm-suppress InternalMethod */
Filesystem::logWarningWhenAddingStorageWrapper($previousLog); Filesystem::logWarningWhenAddingStorageWrapper($previousLog);
OC_Util::tearDownFS(); OC_Util::tearDownFS();

@ -105,12 +105,6 @@
<code>$baseuri</code> <code>$baseuri</code>
</UndefinedGlobalVariable> </UndefinedGlobalVariable>
</file> </file>
<file src="apps/dav/appinfo/v2/publicremote.php">
<InternalMethod>
<code>Filesystem::logWarningWhenAddingStorageWrapper($previousLog)</code>
<code>Filesystem::logWarningWhenAddingStorageWrapper(false)</code>
</InternalMethod>
</file>
<file src="apps/dav/lib/AppInfo/Application.php"> <file src="apps/dav/lib/AppInfo/Application.php">
<InvalidArgument> <InvalidArgument>
<code>CalendarDeletionDefaultUpdaterListener::class</code> <code>CalendarDeletionDefaultUpdaterListener::class</code>

@ -36,7 +36,7 @@ require_once __DIR__ . '/lib/versioncheck.php';
* @param $service * @param $service
* @return string * @return string
*/ */
function resolveService($service) { function resolveService(string $service): string {
$services = [ $services = [
'webdav' => 'dav/appinfo/v1/publicwebdav.php', 'webdav' => 'dav/appinfo/v1/publicwebdav.php',
'dav' => 'dav/appinfo/v2/publicremote.php', 'dav' => 'dav/appinfo/v2/publicremote.php',
@ -74,7 +74,7 @@ try {
$file = resolveService($service); $file = resolveService($service);
if (is_null($file)) { if (!$file) {
throw new RemoteException('Path not found', 404); throw new RemoteException('Path not found', 404);
} }

Loading…
Cancel
Save