diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 59132110977..eddbeed05d5 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -63,6 +63,14 @@ IEventListener + + + $uids + + + ]]> + + IEventListener @@ -89,7 +97,7 @@ - 'OCA\DAV\Connector\Sabre::addPlugin' + dispatch @@ -144,11 +152,17 @@ array array + + Reader::read($objectData) + $objectData $uris $uris + + VCalendar + atomic(function () use ($calendarId, $syncToken, $syncLevel, $limit, $calendarType) { // Current synctoken @@ -268,6 +282,9 @@ + + DTEND]]> + hasTime isFloating @@ -275,6 +292,12 @@ + + $emailAddresses + + + ]]> + getDateTime getDateTime @@ -292,6 +315,15 @@ + + $vevents + VObject\Reader::read($calendarData, + VObject\Reader::OPTION_FORGIVING) + + + VObject\Component\VCalendar|null + VObject\Component\VEvent[] + getDateTime getDateTime @@ -321,7 +353,7 @@ - is_array($modified['old']) + @@ -332,9 +364,12 @@ - [$aclPlugin, 'propFind'] - [$aclPlugin, 'propFind'] + + + + DTEND]]> + get getChildren @@ -365,12 +400,12 @@ - !is_array($newProps['filters']['comps']) - !is_array($newProps['filters']['params']) - !is_array($newProps['filters']['props']) - !isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps']) - !isset($newProps['filters']['params']) || !is_array($newProps['filters']['params']) - !isset($newProps['filters']['props']) || !is_array($newProps['filters']['props']) + + + + + + @@ -383,6 +418,12 @@ getKey()]]> getKey()]]> + + Reader::read($cardData) + + + VCard + @@ -393,8 +434,14 @@ false + + Reader::read($cardData) + + + VCard + - $addressBooks[$row['id']][$readOnlyPropertyName] === 0 + @@ -406,6 +453,15 @@ string + + $type, + 'body' => $val + ]]]> + + + false|array{body: string, Content-Type: string} + $type @@ -452,6 +508,14 @@ bool + + + $data + + + array{bool, string} + + tryTokenLogin @@ -467,6 +531,12 @@ \Sabre\DAV\INode[] + + node]]> + + + Folder + null null @@ -477,9 +547,15 @@ + + node]]> + $data + + \OCP\Files\File + @@ -490,7 +566,7 @@ bool - new PreconditionFailed('Cannot filter by non-existing tag', 0, $e) + \OCA\Circles\Api\v1\Circles @@ -761,8 +837,8 @@ - 'OCA\DAV\Connector\Sabre::addPlugin' - 'OCA\DAV\Connector\Sabre::authInit' + + dispatch @@ -820,12 +896,30 @@ getSize + + + $addressBookNode->getName(), + 'displayName' => $addressBookInfo['{DAV:}displayname'], + 'description' => $addressBookInfo['{' . CardDAVPlugin::NS_CARDDAV . '}addressbook-description'], + 'vCards' => $vCards, + ]]]> + + + array{name: string, displayName: string, description: ?string, vCards: VCard[]} + + + + + ]]> + + $userSession - get_class($res) === 'OpenSSLAsymmetricKey' + @@ -845,10 +939,16 @@ - new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0) + + + files->getMount($path)->getStorage()]]> + + + \OC\Files\Storage\Storage|null + $userSession @@ -870,8 +970,14 @@ $shareId $shareId $shareId - (int)$data['id'] + + + $nodes[0] + + + \OCP\Files\File|\OCP\Files\Folder + @@ -899,14 +1005,30 @@ string - (int)$share['id'] + + + + $result + + + ]]> + + IEventListener + + + dbHandler->getAllServer()]]> + + + ]]> + + $files_list @@ -916,6 +1038,13 @@ fileEncrypted[$fileId]]]> + + $folder + fileEncrypted[$fileId]]]> + + + Folder + fileIsEncrypted]]> fileIsEncrypted]]> @@ -934,6 +1063,12 @@ + + root->get('appdata_'.$instanceId)]]> + + + \OCP\Files\Folder + null null @@ -1003,7 +1138,7 @@ - self::class . '::' . $eventName + dispatch @@ -1025,6 +1160,14 @@ getUniqueStorages + + + storageClass]]> + + + ]]> + + put @@ -1083,7 +1226,7 @@ - 'OCA\\Files_External::loadAdditionalBackends' + dispatch @@ -1110,6 +1253,14 @@ $files_list + + + $mount + + + Mount + + $cacheData @@ -1198,7 +1349,7 @@ - $_['hideFileList'] !== true + @@ -1246,7 +1397,7 @@ - 'OCA\Files_Trashbin::moveToTrash' + mountPoint]]> @@ -1401,8 +1552,14 @@ getId()]]> - (int)$data['id'] + + + $nodes[0] + + + \OCP\Files\File|\OCP\Files\Folder + @@ -1495,7 +1652,7 @@ - 'OCA\\User_LDAP\\User\\User::postLDAPBackendAdded' + dispatch @@ -1802,6 +1959,16 @@ getAllAliases + + + $found + $found + + + array{shareId: int, fileTarget: string, initiator: string, receiver: string, owner: string, mountOwner: string}[] + array{shareId: int, fileTarget: string, initiator: string, receiver: string, owner: string, mountOwner: string}[] + + section @@ -1867,7 +2034,7 @@ - 'OC\AccountManager::userUpdated' + dispatch @@ -1884,6 +2051,12 @@ providerClasses]]> settingsClasses]]> + + settings]]> + + + ActivitySettings[] + @@ -2045,7 +2218,7 @@ - $action['url-postfix'] + @@ -2054,9 +2227,48 @@ + + newInstance()]]> + newInstanceArgs(array_map(function (ReflectionParameter $parameter) { + $parameterType = $parameter->getType(); + + $resolveName = $parameter->getName(); + + // try to find out if it is a class or a simple parameter + if ($parameterType !== null && ($parameterType instanceof ReflectionNamedType) && !$parameterType->isBuiltin()) { + $resolveName = $parameterType->getName(); + } + + try { + $builtIn = $parameter->hasType() && ($parameter->getType() instanceof ReflectionNamedType) + && $parameter->getType()->isBuiltin(); + return $this->query($resolveName, !$builtIn); + } catch (QueryException $e) { + // Service not found, use the default value when available + if ($parameter->isDefaultValueAvailable()) { + return $parameter->getDefaultValue(); + } + + if ($parameterType !== null && ($parameterType instanceof ReflectionNamedType) && !$parameterType->isBuiltin()) { + $resolveName = $parameter->getName(); + try { + return $this->query($resolveName); + } catch (QueryException $e2) { + // don't lose the error we got while trying to query by type + throw new QueryException($e->getMessage(), (int) $e->getCode(), $e); + } + } + + throw $e; + } + }, $constructor->getParameters()))]]> + ArrayAccess + + \stdClass + getCode()]]> @@ -2111,7 +2323,7 @@ - + $row['provider_id'], @@ -2119,10 +2331,10 @@ 'enabled' => 1 === (int) $row['enabled'], ]; }, $rows)]]> - - - int[] - + + + ]]> + @@ -2152,11 +2364,6 @@ providers]]> - - - $provider['provider_id'] - - $jobList @@ -2175,6 +2382,26 @@ + + container->get($registration->getService()); + } catch (Throwable $e) { + $this->logger->error('Could not load calendar provider ' . $registration->getService() . ': ' . $e->getMessage(), [ + 'exception' => $e, + ]); + return []; + } + + return $provider->getCalendars($principalUri, $calendarUris); + }, $context->getCalendarProviders()) + )]]> + + + ICreateFromString[] + getParams - $params['collation'] + @@ -2280,8 +2507,8 @@ $params - $params['adapter'] - $params['tablePrefix'] + + adapter->lastInsertId($seqName)]]> @@ -2307,6 +2534,12 @@ $offset $offset + + $s + + + IMigrationStep + @@ -2327,7 +2560,7 @@ getParams - $params['collation'] + @@ -2403,10 +2636,21 @@ + + manager->getFileForToken($this->data['user_id'], $this->data['file_id'], $this->data['file_path'])]]> + getShareForToken + + + $uniqueUserIds, 'public' => $public]]]> + + + array{users: string[], public: bool} + + deleteUserKey @@ -2427,6 +2671,16 @@ dispatch + + + event->setArgument($key, $value)]]> + event->setArguments($args)]]> + + + setArgument + setArguments + + $eventName @@ -2446,6 +2700,14 @@ $providerId + + + folder]]> + + + Folder + + $parentData @@ -2522,10 +2784,10 @@ $user - get_class($provider) !== 'OCA\Files_Sharing\MountProvider' + - get_class($provider) === 'OCA\Files_Sharing\MountProvider' + @@ -2536,6 +2798,12 @@ array + + cacheInfoCache[$fileId]]]> + + + array{int, string, int} + @@ -2543,6 +2811,16 @@ + + getStorage()]]> + findByNumericId($id)]]> + findByStorageId($id)]]> + + + Mount\MountPoint[] + Mount\MountPoint[] + \OC\Files\Storage\Storage|null + addStorageWrapper @@ -2569,25 +2847,37 @@ + + root->get($this->getFullPath($path))]]> + root->getByIdInPath((int)$id, $this->getPath())]]> + createNode($file->getPath(), $file); + }, $files)]]> + $node + + \OC\Files\Node\Node + \OC\Files\Node\Node[] + \OC\Files\Node\Node[] + - '\OCP\Files::postCopy' - '\OCP\Files::postCreate' - '\OCP\Files::postDelete' - '\OCP\Files::postRename' - '\OCP\Files::postTouch' - '\OCP\Files::postWrite' - '\OCP\Files::preCopy' - '\OCP\Files::preCreate' - '\OCP\Files::preDelete' - '\OCP\Files::preRename' - '\OCP\Files::preTouch' - '\OCP\Files::preWrite' - '\OCP\Files::read' + + + + + + + + + + + + + dispatch @@ -2625,9 +2915,17 @@ __call(__FUNCTION__, func_get_args())]]> + + + $node + + + Folder + + - '\OCP\Files::' . $hook + FileInfo @@ -2635,6 +2933,12 @@ getChecksum + + parent]]> + + + INode|IRootFolder + fileInfo]]> @@ -2650,9 +2954,21 @@ - + + $folders + createNode($fullPath, $fileInfo, false)]]> + mountManager->findByNumericId($numericId)]]> + mountManager->findByStorageId($storageId)]]> + mountManager->findIn($mountPoint)]]> + user]]> + + + MountPoint[] + Node + \OC\Files\Mount\MountPoint[] + \OC\Files\Mount\MountPoint[] \OC\User\User - + user]]> @@ -2682,7 +2998,7 @@ Promise\promise_for( new Credentials($key, $secret) ) - \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider()) + @@ -2859,6 +3175,14 @@ int + + + $mounts + + + \OC\Files\Mount\MountPoint[] + + $mtime @@ -2891,20 +3215,26 @@ - IGroup::class . '::postAddUser' - IGroup::class . '::postDelete' - IGroup::class . '::postRemoveUser' - IGroup::class . '::preAddUser' - IGroup::class . '::preDelete' - IGroup::class . '::preRemoveUser' + + + + + + bool $hide + + $users + $user + + \OC\User\User[] + emitter]]> emitter]]> @@ -2926,6 +3256,15 @@ + + $groups + array_values($groups) + array_values($groups) + + + \OC\Group\Group[] + \OC\Group\Group[] + createGroup getGroupDetails @@ -2951,8 +3290,8 @@ false - $app['path'] - $app['path'] + + null @@ -3121,6 +3460,9 @@ false|resource + + null|string + ISimpleFile @@ -3272,6 +3614,22 @@ new GenericEvent($user) + + get(IFile::class)]]> + get(IGroupManager::class)]]> + get(INavigationManager::class)]]> + get(IUserManager::class)]]> + get(IUserSession::class)]]> + get(\OCP\Encryption\IManager::class)]]> + + + \OC\Encryption\File + \OC\Encryption\Manager + \OC\Group\Manager + \OC\NavigationManager + \OC\User\Manager + \OC\User\Session + \OC\OCSClient @@ -3306,8 +3664,8 @@ - $content !== '' - $type === 'pdo' + + $vendor @@ -3337,7 +3695,7 @@ getId()]]> getId()]]> - (int)$data['id'] + set @@ -3349,12 +3707,12 @@ $id - 'OCP\Share::postAcceptShare' - 'OCP\Share::postShare' - 'OCP\Share::postUnshare' - 'OCP\Share::postUnshareFromSelf' - 'OCP\Share::preShare' - 'OCP\Share::preUnshare' + + + + + + dispatch @@ -3413,6 +3771,14 @@ getLazyRootFolder + + + node]]> + + + getNode + + $stream @@ -3543,7 +3909,7 @@ boolean|null - IUser::class . '::firstLogin' + server]]> @@ -3555,11 +3921,11 @@ - IUser::class . '::changeUser' - IUser::class . '::postDelete' - IUser::class . '::postSetPassword' - IUser::class . '::preDelete' - IUser::class . '::preSetPassword' + + + + + dispatch @@ -3590,8 +3956,8 @@ ManagerEvent::EVENT_APP_UPDATE - $dir['path'] - $dir['url'] + + null @@ -3667,6 +4033,14 @@ $column + + + headers)]]> + + + array{X-Request-Id: string, Cache-Control: string, Content-Security-Policy: string, Feature-Policy: string, X-Robots-Tag: string, Last-Modified?: string, ETag?: string, ...H} + + EVENT_FAILED @@ -3678,6 +4052,14 @@ \ArrayAccess + + + $step + + + array{0: int, 1: int, 2: int} + + mixed @@ -3709,4 +4091,12 @@ \Iterator + + + mode]]> + + + null|IPreview::MODE_FILL|IPreview::MODE_COVER + + diff --git a/psalm.xml b/psalm.xml index 831b875d5a0..87cecf3e2d2 100644 --- a/psalm.xml +++ b/psalm.xml @@ -83,6 +83,10 @@ + + + +