Skip to content

Commit

Permalink
Update psalm baseline
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
nextcloud-command committed Apr 3, 2024
1 parent 9ae598d commit d455c79
Showing 1 changed file with 2 additions and 141 deletions.
143 changes: 2 additions & 141 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,86 +123,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>
Expand Down Expand Up @@ -508,7 +428,6 @@
<code>\OCA\Circles\Api\v1\Circles</code>
</UndefinedClass>
<UndefinedInterfaceMethod>
<code>getById</code>
<code>getPath</code>
</UndefinedInterfaceMethod>
</file>
Expand Down Expand Up @@ -813,12 +732,6 @@
<code>$shareId</code>
<code>(int)$data['id']</code>
</InvalidArgument>
<LessSpecificReturnStatement>
<code>$nodes[0]</code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType>
<code>\OCP\Files\File|\OCP\Files\Folder</code>
</MoreSpecificReturnType>
</file>
<file src="apps/federatedfilesharing/lib/Notifications.php">
<InvalidReturnType>
Expand Down Expand Up @@ -1111,15 +1024,8 @@
</InvalidReturnType>
</file>
<file src="apps/files_trashbin/lib/Trash/LegacyTrashBackend.php">
<RedundantCondition>
<code>$trashFiles</code>
</RedundantCondition>
<TypeDoesNotContainType>
<code>null</code>
</TypeDoesNotContainType>
<UndefinedInterfaceMethod>
<code>$file</code>
<code>getById</code>
</UndefinedInterfaceMethod>
</file>
<file src="apps/files_trashbin/lib/Trashbin.php">
Expand Down Expand Up @@ -1228,14 +1134,6 @@
<code>array{0: int, 1: int, 2: int}</code>
</InvalidReturnType>
</file>
<file src="apps/updatenotification/lib/Notification/BackgroundJob.php">
<InvalidArgument>
<code>false</code>
</InvalidArgument>
<InvalidPropertyAssignmentValue>
<code><![CDATA[$this->users]]></code>
</InvalidPropertyAssignmentValue>
</file>
<file src="apps/user_ldap/ajax/getNewServerConfigPrefix.php">
<InvalidScalarArgument>
<code>$ln + 1</code>
Expand Down Expand Up @@ -1415,21 +1313,11 @@
<code>isUserScopeEnabled</code>
</UndefinedInterfaceMethod>
</file>
<file src="core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php">
<ParamNameMismatch>
<code>$arguments</code>
</ParamNameMismatch>
</file>
<file src="core/BackgroundJobs/CheckForUserCertificates.php">
<ParamNameMismatch>
<code>$arguments</code>
</ParamNameMismatch>
</file>
<file src="core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php">
<ParamNameMismatch>
<code>$arguments</code>
</ParamNameMismatch>
</file>
<file src="core/Command/App/Install.php">
<TypeDoesNotContainType>
<code>$result === false</code>
Expand Down Expand Up @@ -1804,15 +1692,7 @@
</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>
<LessSpecificReturnStatement/>
<MoreSpecificReturnType>
<code><![CDATA[list<array{provider_id: string, uid: string, enabled: bool}>]]></code>
</MoreSpecificReturnType>
Expand Down Expand Up @@ -2011,10 +1891,7 @@
'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>
<InvalidDocblock/>
<InvalidReturnStatement>
<code><![CDATA[$l->l($type, $timestamp, [
'width' => $format,
Expand Down Expand Up @@ -2237,7 +2114,6 @@
<file src="lib/private/Files/Node/Folder.php">
<LessSpecificReturnStatement>
<code><![CDATA[$this->root->get($this->getFullPath($path))]]></code>
<code><![CDATA[$this->root->getByIdInPath((int)$id, $this->getPath())]]></code>
<code><![CDATA[array_map(function (FileInfo $file) {
return $this->createNode($file->getPath(), $file);
}, $files)]]></code>
Expand Down Expand Up @@ -2933,15 +2809,6 @@
<code><![CDATA[$this->dbprettyname]]></code>
</UndefinedThisPropertyFetch>
</file>
<file src="lib/private/Share/Share.php">
<InvalidOperand>
<code>!self::isResharingAllowed()</code>
</InvalidOperand>
<UndefinedInterfaceMethod>
<code>getParents</code>
<code>getParents</code>
</UndefinedInterfaceMethod>
</file>
<file src="lib/private/Share20/DefaultShareProvider.php">
<InvalidArgument>
<code><![CDATA[$share->getId()]]></code>
Expand Down Expand Up @@ -3003,12 +2870,6 @@
<code>private $roomShareProvider = null;</code>
<code>private $shareByCircleProvider = null;</code>
</UndefinedDocblockClass>
<UndefinedInterfaceMethod>
<code>getLazyRootFolder</code>
<code>getLazyRootFolder</code>
<code>getLazyRootFolder</code>
<code>getLazyRootFolder</code>
</UndefinedInterfaceMethod>
</file>
<file src="lib/private/Share20/Share.php">
<LessSpecificReturnStatement>
Expand Down

0 comments on commit d455c79

Please sign in to comment.