diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-04-04 18:05:57 +0200 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2024-04-08 11:29:09 +0200 |
commit | b70180a5e4bd2655eeed3c670f856e8e75f63579 (patch) | |
tree | 71447f16a77d35d08898607d704cea05b2caf1b3 /build/psalm-baseline.xml | |
parent | 0e483a0da1178b93b752afff886e620a299dfb41 (diff) | |
download | nextcloud-server-b70180a5e4bd2655eeed3c670f856e8e75f63579.tar.gz nextcloud-server-b70180a5e4bd2655eeed3c670f856e8e75f63579.zip |
chore: Add 3rdparty error to baseline. Also removed fixed errors.
The CDATA stuff comes from a psalm new version, nothing to worry about,
both syntax are equivalent.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'build/psalm-baseline.xml')
-rw-r--r-- | build/psalm-baseline.xml | 173 |
1 files changed, 36 insertions, 137 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index c2a606e4170..be80da57b39 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -38,6 +38,11 @@ <code>array</code> </LessSpecificImplementedReturnType> </file> + <file src="3rdparty/symfony/routing/Route.php"> + <MethodSignatureMustProvideReturnType> + <code>unserialize</code> + </MethodSignatureMustProvideReturnType> + </file> <file src="apps/comments/lib/Notification/Listener.php"> <LessSpecificReturnStatement> <code>$uids</code> @@ -109,7 +114,6 @@ <file src="apps/dav/lib/CalDAV/CalDavBackend.php"> <InvalidNullableReturnType> <code>array</code> - <code>array</code> </InvalidNullableReturnType> <LessSpecificReturnStatement> <code>Reader::read($objectData)</code> @@ -123,86 +127,6 @@ <code>VCalendar</code> </MoreSpecificReturnType> <NullableReturnStatement> - <code><![CDATA[$this->atomic(function () use ($calendarId, $syncToken, $syncLevel, $limit, $calendarType) { - // Current synctoken - $qb = $this->db->getQueryBuilder(); - $qb->select('synctoken') - ->from('calendars') - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($calendarId)) - ); - $stmt = $qb->executeQuery(); - $currentToken = $stmt->fetchOne(); - - if ($currentToken === false) { - return null; - } - - $result = [ - 'syncToken' => $currentToken, - 'added' => [], - 'modified' => [], - 'deleted' => [], - ]; - - if ($syncToken) { - $qb = $this->db->getQueryBuilder(); - - $qb->select('uri', 'operation') - ->from('calendarchanges') - ->where( - $qb->expr()->andX( - $qb->expr()->gte('synctoken', $qb->createNamedParameter($syncToken)), - $qb->expr()->lt('synctoken', $qb->createNamedParameter($currentToken)), - $qb->expr()->eq('calendarid', $qb->createNamedParameter($calendarId)), - $qb->expr()->eq('calendartype', $qb->createNamedParameter($calendarType)) - ) - )->orderBy('synctoken'); - if (is_int($limit) && $limit > 0) { - $qb->setMaxResults($limit); - } - - // Fetching all changes - $stmt = $qb->executeQuery(); - $changes = []; - - // This loop ensures that any duplicates are overwritten, only the - // last change on a node is relevant. - while ($row = $stmt->fetch()) { - $changes[$row['uri']] = $row['operation']; - } - $stmt->closeCursor(); - - foreach ($changes as $uri => $operation) { - switch ($operation) { - case 1: - $result['added'][] = $uri; - break; - case 2: - $result['modified'][] = $uri; - break; - case 3: - $result['deleted'][] = $uri; - break; - } - } - } else { - // No synctoken supplied, this is the initial sync. - $qb = $this->db->getQueryBuilder(); - $qb->select('uri') - ->from('calendarobjects') - ->where( - $qb->expr()->andX( - $qb->expr()->eq('calendarid', $qb->createNamedParameter($calendarId)), - $qb->expr()->eq('calendartype', $qb->createNamedParameter($calendarType)) - ) - ); - $stmt = $qb->executeQuery(); - $result['added'] = $stmt->fetchAll(\PDO::FETCH_COLUMN); - $stmt->closeCursor(); - } - return $result; - }, $this->db)]]></code> <code>null</code> </NullableReturnStatement> </file> @@ -312,7 +236,7 @@ </RedundantCast> <RedundantCondition> <code><![CDATA[!empty($modified['old']) && is_array($modified['old'])]]></code> - <code>is_array($modified['old'])</code> + <code><![CDATA[is_array($modified['old'])]]></code> </RedundantCondition> </file> <file src="apps/dav/lib/CalDAV/Schedule/IMipService.php"> @@ -323,8 +247,8 @@ </file> <file src="apps/dav/lib/CalDAV/Schedule/Plugin.php"> <InvalidArgument> - <code>[$aclPlugin, 'propFind']</code> - <code>[$aclPlugin, 'propFind']</code> + <code><![CDATA[[$aclPlugin, 'propFind']]]></code> + <code><![CDATA[[$aclPlugin, 'propFind']]]></code> </InvalidArgument> <LessSpecificReturnStatement> <code><![CDATA[$vevent->DTEND]]></code> @@ -359,12 +283,12 @@ </file> <file src="apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php"> <TypeDoesNotContainType> - <code>!is_array($newProps['filters']['comps'])</code> - <code>!is_array($newProps['filters']['params'])</code> - <code>!is_array($newProps['filters']['props'])</code> - <code>!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])</code> - <code>!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])</code> - <code>!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])</code> + <code><![CDATA[!is_array($newProps['filters']['comps'])]]></code> + <code><![CDATA[!is_array($newProps['filters']['params'])]]></code> + <code><![CDATA[!is_array($newProps['filters']['props'])]]></code> + <code><![CDATA[!isset($newProps['filters']['comps']) || !is_array($newProps['filters']['comps'])]]></code> + <code><![CDATA[!isset($newProps['filters']['params']) || !is_array($newProps['filters']['params'])]]></code> + <code><![CDATA[!isset($newProps['filters']['props']) || !is_array($newProps['filters']['props'])]]></code> </TypeDoesNotContainType> </file> <file src="apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php"> @@ -400,7 +324,7 @@ <code>VCard</code> </MoreSpecificReturnType> <TypeDoesNotContainType> - <code>$addressBooks[$row['id']][$readOnlyPropertyName] === 0</code> + <code><![CDATA[$addressBooks[$row['id']][$readOnlyPropertyName] === 0]]></code> </TypeDoesNotContainType> </file> <file src="apps/dav/lib/CardDAV/MultiGetExportPlugin.php"> @@ -502,7 +426,7 @@ <code>bool</code> </InvalidNullableReturnType> <TooManyArguments> - <code>new PreconditionFailed('Cannot filter by non-existing tag', 0, $e)</code> + <code><![CDATA[new PreconditionFailed('Cannot filter by non-existing tag', 0, $e)]]></code> </TooManyArguments> <UndefinedClass> <code>\OCA\Circles\Api\v1\Circles</code> @@ -767,7 +691,7 @@ </file> <file src="apps/encryption/lib/Crypto/Crypt.php"> <TypeDoesNotContainType> - <code>get_class($res) === 'OpenSSLAsymmetricKey'</code> + <code><![CDATA[get_class($res) === 'OpenSSLAsymmetricKey']]></code> </TypeDoesNotContainType> </file> <file src="apps/encryption/lib/Crypto/Encryption.php"> @@ -782,7 +706,7 @@ </file> <file src="apps/encryption/lib/Session.php"> <TooManyArguments> - <code>new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0)</code> + <code><![CDATA[new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0)]]></code> </TooManyArguments> </file> <file src="apps/encryption/lib/Util.php"> @@ -810,7 +734,7 @@ <code>$shareId</code> <code>$shareId</code> <code>$shareId</code> - <code>(int)$data['id']</code> + <code><![CDATA[(int)$data['id']]]></code> </InvalidArgument> </file> <file src="apps/federatedfilesharing/lib/Notifications.php"> @@ -834,7 +758,7 @@ <code>string</code> </InvalidReturnType> <InvalidScalarArgument> - <code>(int)$share['id']</code> + <code><![CDATA[(int)$share['id']]]></code> </InvalidScalarArgument> </file> <file src="apps/federation/lib/DbHandler.php"> @@ -1063,7 +987,7 @@ </file> <file src="apps/files_sharing/templates/public.php"> <RedundantCondition> - <code>$_['hideFileList'] !== true</code> + <code><![CDATA[$_['hideFileList'] !== true]]></code> <code><![CDATA[isset($_['hideFileList']) && $_['hideFileList'] !== true]]></code> </RedundantCondition> </file> @@ -1193,7 +1117,7 @@ <file src="apps/sharebymail/lib/ShareByMailProvider.php"> <InvalidArgument> <code><![CDATA[$share->getId()]]></code> - <code>(int)$data['id']</code> + <code><![CDATA[(int)$data['id']]]></code> </InvalidArgument> </file> <file src="apps/systemtags/lib/Activity/Listener.php"> @@ -1202,11 +1126,6 @@ <code><![CDATA[$event->getObjectId()]]></code> </InvalidArgument> </file> - <file src="apps/theming/lib/Jobs/MigrateBackgroundImages.php"> - <OverriddenInterfaceConstant> - <code>TIME_SENSITIVE</code> - </OverriddenInterfaceConstant> - </file> <file src="apps/theming/lib/Util.php"> <InvalidReturnStatement> <code><![CDATA[array_values($color->getRgb())]]></code> @@ -1512,7 +1431,6 @@ <file src="core/routes.php"> <InvalidScope> <code>$this</code> - <code>$this</code> <code><![CDATA[$this->create('core_ajax_update', '/core/ajax/update.php')]]></code> </InvalidScope> </file> @@ -1682,7 +1600,7 @@ </file> <file src="lib/private/AppFramework/Routing/RouteConfig.php"> <InvalidArrayOffset> - <code>$action['url-postfix']</code> + <code><![CDATA[$action['url-postfix']]]></code> </InvalidArrayOffset> </file> <file src="lib/private/AppFramework/Services/AppConfig.php"> @@ -1772,20 +1690,6 @@ <code>setType</code> </UndefinedMagicMethod> </file> - <file src="lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php"> - <LessSpecificReturnStatement> - <code><![CDATA[array_map(function (array $row) { - return [ - 'provider_id' => $row['provider_id'], - 'uid' => $row['uid'], - 'enabled' => 1 === (int) $row['enabled'], - ]; - }, $rows)]]></code> - </LessSpecificReturnStatement> - <MoreSpecificReturnType> - <code><![CDATA[list<array{provider_id: string, uid: string, enabled: bool}>]]></code> - </MoreSpecificReturnType> - </file> <file src="lib/private/Authentication/TwoFactorAuth/ProviderSet.php"> <InvalidArgument> <code><![CDATA[$this->providers]]></code> @@ -1906,7 +1810,7 @@ <code>getParams</code> </InternalMethod> <InvalidArrayOffset> - <code>$params['collation']</code> + <code><![CDATA[$params['collation']]]></code> </InvalidArrayOffset> </file> <file src="lib/private/DB/Connection.php"> @@ -1917,8 +1821,8 @@ <code>$params</code> </InvalidArgument> <InvalidArrayOffset> - <code>$params['adapter']</code> - <code>$params['tablePrefix']</code> + <code><![CDATA[$params['adapter']]]></code> + <code><![CDATA[$params['tablePrefix']]]></code> </InvalidArrayOffset> </file> <file src="lib/private/DB/Exceptions/DbalException.php"> @@ -1951,7 +1855,7 @@ <code>getParams</code> </InternalMethod> <InvalidArrayOffset> - <code>$params['collation']</code> + <code><![CDATA[$params['collation']]]></code> </InvalidArrayOffset> </file> <file src="lib/private/DB/QueryBuilder/QueryBuilder.php"> @@ -1980,10 +1884,6 @@ 'width' => $format, ])]]></code> </FalsableReturnStatement> - <InvalidDocblock> - <code>public function formatDateSpan($timestamp, $baseTimestamp = null, \OCP\IL10N $l = null) {</code> - <code>public function formatTimeSpan($timestamp, $baseTimestamp = null, \OCP\IL10N $l = null) {</code> - </InvalidDocblock> <InvalidReturnStatement> <code><![CDATA[$l->l($type, $timestamp, [ 'width' => $format, @@ -2146,10 +2046,10 @@ <code>$user</code> </InvalidOperand> <RedundantCondition> - <code>get_class($provider) !== 'OCA\Files_Sharing\MountProvider'</code> + <code><![CDATA[get_class($provider) !== 'OCA\Files_Sharing\MountProvider']]></code> </RedundantCondition> <TypeDoesNotContainType> - <code>get_class($provider) === 'OCA\Files_Sharing\MountProvider'</code> + <code><![CDATA[get_class($provider) === 'OCA\Files_Sharing\MountProvider']]></code> </TypeDoesNotContainType> </file> <file src="lib/private/Files/Config/UserMountCache.php"> @@ -2216,7 +2116,6 @@ <MoreSpecificReturnType> <code>\OC\Files\Node\Node</code> <code>\OC\Files\Node\Node[]</code> - <code>\OC\Files\Node\Node[]</code> </MoreSpecificReturnType> </file> <file src="lib/private/Files/Node/HookConnector.php"> @@ -2313,7 +2212,7 @@ <code>Promise\promise_for( new Credentials($key, $secret) )</code> - <code>\Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider())</code> + <code><![CDATA[\Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider())]]></code> </UndefinedFunction> </file> <file src="lib/private/Files/ObjectStore/S3ObjectTrait.php"> @@ -2561,8 +2460,8 @@ <code>false</code> </InvalidArgument> <InvalidArrayOffset> - <code>$app['path']</code> - <code>$app['path']</code> + <code><![CDATA[$app['path']]]></code> + <code><![CDATA[$app['path']]]></code> </InvalidArrayOffset> <NullArgument> <code>null</code> @@ -2884,7 +2783,7 @@ </file> <file src="lib/private/Setup.php"> <RedundantCondition> - <code>$type === 'pdo'</code> + <code><![CDATA[$type === 'pdo']]></code> </RedundantCondition> <UndefinedVariable> <code>$vendor</code> @@ -2905,7 +2804,7 @@ <InvalidArgument> <code><![CDATA[$share->getId()]]></code> <code><![CDATA[$share->getId()]]></code> - <code>(int)$data['id']</code> + <code><![CDATA[(int)$data['id']]]></code> </InvalidArgument> <TooManyArguments> <code>set</code> @@ -3097,8 +2996,8 @@ <code>$groupsList</code> </InvalidArgument> <InvalidArrayOffset> - <code>$dir['path']</code> - <code>$dir['url']</code> + <code><![CDATA[$dir['path']]]></code> + <code><![CDATA[$dir['url']]]></code> </InvalidArrayOffset> <NullArgument> <code>null</code> |