diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index a6c00a59174ce..1424ee4f9be2a 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2347,7 +2347,7 @@ public function getCalendarObjectById(string $principalUri, int $id): ?array {
* @param int $syncLevel
* @param int|null $limit
* @param int $calendarType
- * @return array
+ * @return ?array
*/
public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 4ab1fc1dd2d66..ac0ada36d069c 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -123,86 +123,6 @@
VCalendar
- 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)]]>
null
@@ -312,7 +232,7 @@
- is_array($modified['old'])
+
@@ -323,8 +243,8 @@
- [$aclPlugin, 'propFind']
- [$aclPlugin, 'propFind']
+
+
DTEND]]>
@@ -359,12 +279,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'])
+
+
+
+
+
+
@@ -400,7 +320,7 @@
VCard
- $addressBooks[$row['id']][$readOnlyPropertyName] === 0
+
@@ -502,13 +422,12 @@
bool
- new PreconditionFailed('Cannot filter by non-existing tag', 0, $e)
+
\OCA\Circles\Api\v1\Circles
- getById
getPath
@@ -768,7 +687,7 @@
- get_class($res) === 'OpenSSLAsymmetricKey'
+
@@ -783,7 +702,7 @@
- new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0)
+
@@ -811,14 +730,8 @@
$shareId
$shareId
$shareId
- (int)$data['id']
+
-
- $nodes[0]
-
-
- \OCP\Files\File|\OCP\Files\Folder
-
@@ -841,7 +754,7 @@
string
- (int)$share['id']
+
@@ -918,9 +831,6 @@
-
- empty($encryptedFiles)
-
isReadyForUser
@@ -1070,7 +980,7 @@
- $_['hideFileList'] !== true
+
@@ -1112,15 +1022,8 @@
-
- $trashFiles
-
-
- null
-
$file
- getById
@@ -1207,7 +1110,7 @@
getId()]]>
- (int)$data['id']
+
@@ -1229,14 +1132,6 @@
array{0: int, 1: int, 2: int}
-
-
- false
-
-
- users]]>
-
-
$ln + 1
@@ -1416,21 +1311,11 @@
isUserScopeEnabled
-
-
- $arguments
-
-
$arguments
-
-
- $arguments
-
-
$result === false
@@ -1714,7 +1599,7 @@
- $action['url-postfix']
+
@@ -1805,15 +1690,7 @@
-
- $row['provider_id'],
- 'uid' => $row['uid'],
- 'enabled' => 1 === (int) $row['enabled'],
- ];
- }, $rows)]]>
-
+
]]>
@@ -1938,7 +1815,7 @@
getParams
- $params['collation']
+
@@ -1949,8 +1826,8 @@
$params
- $params['adapter']
- $params['tablePrefix']
+
+
@@ -1983,7 +1860,7 @@
getParams
- $params['collation']
+
@@ -1994,7 +1871,6 @@
$alias
- $groupBys
$selects
@@ -2012,10 +1888,7 @@
'width' => $format,
])]]>
-
- public function formatDateSpan($timestamp, $baseTimestamp = null, \OCP\IL10N $l = null) {
- public function formatTimeSpan($timestamp, $baseTimestamp = null, \OCP\IL10N $l = null) {
-
+
l($type, $timestamp, [
'width' => $format,
@@ -2178,10 +2051,10 @@
$user
- get_class($provider) !== 'OCA\Files_Sharing\MountProvider'
+
- get_class($provider) === 'OCA\Files_Sharing\MountProvider'
+
@@ -2238,7 +2111,6 @@
root->get($this->getFullPath($path))]]>
- root->getByIdInPath((int)$id, $this->getPath())]]>
createNode($file->getPath(), $file);
}, $files)]]>
@@ -2346,7 +2218,7 @@
Promise\promise_for(
new Credentials($key, $secret)
)
- \Aws\or_chain([self::class, 'legacySignatureProvider'], ClientResolver::_default_signature_provider())
+
@@ -2594,8 +2466,8 @@
false
- $app['path']
- $app['path']
+
+
null
@@ -2917,7 +2789,7 @@
- $type === 'pdo'
+
$vendor
@@ -2934,20 +2806,11 @@
dbprettyname]]>
-
-
- !self::isResharingAllowed()
-
-
- getParents
- getParents
-
-
getId()]]>
getId()]]>
- (int)$data['id']
+
set
@@ -3004,12 +2867,6 @@
private $roomShareProvider = null;
private $shareByCircleProvider = null;
-
- getLazyRootFolder
- getLazyRootFolder
- getLazyRootFolder
- getLazyRootFolder
-
@@ -3145,8 +3002,8 @@
$groupsList
- $dir['path']
- $dir['url']
+
+
null
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
index db5da97f27588..39697a7cb7ede 100644
--- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
+++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php
@@ -112,8 +112,8 @@ public function deleteByUser(string $uid): array {
return array_map(function (array $row) {
return [
- 'provider_id' => $row['provider_id'],
- 'uid' => $row['uid'],
+ 'provider_id' => (string) $row['provider_id'],
+ 'uid' => (string) $row['uid'],
'enabled' => (int) $row['enabled'] === 1,
];
}, $rows);
diff --git a/lib/private/DateTimeFormatter.php b/lib/private/DateTimeFormatter.php
index 0c5b6a55882f2..da3f68f07b35b 100644
--- a/lib/private/DateTimeFormatter.php
+++ b/lib/private/DateTimeFormatter.php
@@ -136,14 +136,13 @@ public function formatDateRelativeDay($timestamp, $format = 'long', ?\DateTimeZo
* Gives the relative date of the timestamp
* Only works for past dates
*
- * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
+ * @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
* @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
- * @return string Dates returned are:
+ * @param \OCP\IL10N $l The locale to use
+ * @return string Formatted date span. Dates returned are:
* < 1 month => Today, Yesterday, n days ago
* < 13 month => last month, n months ago
* >= 13 month => last year, n years ago
- * @param \OCP\IL10N $l The locale to use
- * @return string Formatted date span
*/
public function formatDateSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
@@ -220,15 +219,14 @@ public function formatTime($timestamp, $format = 'medium', ?\DateTimeZone $timeZ
*
* @param int|\DateTime $timestamp Either a Unix timestamp or DateTime object
* @param int|\DateTime $baseTimestamp Timestamp to compare $timestamp against, defaults to current time
- * @return string Dates returned are:
+ * @param \OCP\IL10N $l The locale to use
+ * @return string Formatted time span. Dates returned are:
* < 60 sec => seconds ago
* < 1 hour => n minutes ago
* < 1 day => n hours ago
* < 1 month => Yesterday, n days ago
* < 13 month => last month, n months ago
* >= 13 month => last year, n years ago
- * @param \OCP\IL10N $l The locale to use
- * @return string Formatted time span
*/
public function formatTimeSpan($timestamp, $baseTimestamp = null, ?\OCP\IL10N $l = null) {
$l = $this->getLocale($l);
diff --git a/lib/public/DB/IResult.php b/lib/public/DB/IResult.php
index 10a60cd5ff4e1..154dcdf9029ad 100644
--- a/lib/public/DB/IResult.php
+++ b/lib/public/DB/IResult.php
@@ -63,7 +63,7 @@ public function fetch(int $fetchMode = PDO::FETCH_ASSOC);
/**
* @param int $fetchMode (one of PDO::FETCH_ASSOC, PDO::FETCH_NUM or PDO::FETCH_COLUMN (2, 3 or 7)
*
- * @return mixed[]
+ * @return list
*
* @since 21.0.0
*/