Merge pull request #48867 from nextcloud/fix/apps/wrong-missing-casts

pull/48864/head
Kate 2024-10-23 17:47:25 +07:00 committed by GitHub
commit c00d49bb55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 21 deletions

@ -490,7 +490,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
$notification = $this->notificationManager->createNotification(); $notification = $this->notificationManager->createNotification();
$notification->setApp('files_sharing') $notification->setApp('files_sharing')
->setUser($share['user']) ->setUser($share['user'])
->setObject('remote_share', (int)$share['id']); ->setObject('remote_share', (string)$share['id']);
$this->notificationManager->markProcessed($notification); $this->notificationManager->markProcessed($notification);
$event = $this->activityManager->generateEvent(); $event = $this->activityManager->generateEvent();

@ -980,7 +980,7 @@ class Trashbin implements IEventListener {
$pattern = \OC::$server->getDatabaseConnection()->escapeLikeParameter(basename($filename)); $pattern = \OC::$server->getDatabaseConnection()->escapeLikeParameter(basename($filename));
if ($timestamp) { if ($timestamp) {
// fetch for old versions // fetch for old versions
$escapedTimestamp = \OC::$server->getDatabaseConnection()->escapeLikeParameter($timestamp); $escapedTimestamp = \OC::$server->getDatabaseConnection()->escapeLikeParameter((string)$timestamp);
$pattern .= '.v%.d' . $escapedTimestamp; $pattern .= '.v%.d' . $escapedTimestamp;
$offset = -strlen($escapedTimestamp) - 2; $offset = -strlen($escapedTimestamp) - 2;
} else { } else {

@ -18,7 +18,7 @@ $serverConnections = $helper->getServerConfigurationPrefixes();
sort($serverConnections); sort($serverConnections);
$lk = array_pop($serverConnections); $lk = array_pop($serverConnections);
$ln = (int)str_replace('s', '', $lk); $ln = (int)str_replace('s', '', $lk);
$nk = 's' . str_pad($ln + 1, 2, '0', STR_PAD_LEFT); $nk = 's' . str_pad((string)($ln + 1), 2, '0', STR_PAD_LEFT);
$resultData = ['configPrefix' => $nk]; $resultData = ['configPrefix' => $nk];

@ -62,7 +62,7 @@ class RequestTime implements ICheck {
[$hour1, $minute1] = explode(':', $time1); [$hour1, $minute1] = explode(':', $time1);
$date1 = new \DateTime('now', new \DateTimeZone($timezone1)); $date1 = new \DateTime('now', new \DateTimeZone($timezone1));
$date1->setTimestamp($currentTimestamp); $date1->setTimestamp($currentTimestamp);
$date1->setTime($hour1, $minute1); $date1->setTime((int)$hour1, (int)$minute1);
return $date1->getTimestamp(); return $date1->getTimestamp();
} }

@ -722,9 +722,6 @@
<InvalidReturnType> <InvalidReturnType>
<code><![CDATA[string]]></code> <code><![CDATA[string]]></code>
</InvalidReturnType> </InvalidReturnType>
<InvalidScalarArgument>
<code><![CDATA[(int)$share['id']]]></code>
</InvalidScalarArgument>
</file> </file>
<file src="apps/federation/lib/DbHandler.php"> <file src="apps/federation/lib/DbHandler.php">
<LessSpecificReturnStatement> <LessSpecificReturnStatement>
@ -978,9 +975,6 @@
<InvalidArgument> <InvalidArgument>
<code><![CDATA[$timestamp]]></code> <code><![CDATA[$timestamp]]></code>
</InvalidArgument> </InvalidArgument>
<InvalidScalarArgument>
<code><![CDATA[$timestamp]]></code>
</InvalidScalarArgument>
</file> </file>
<file src="apps/files_versions/appinfo/routes.php"> <file src="apps/files_versions/appinfo/routes.php">
<InvalidScope> <InvalidScope>
@ -1072,11 +1066,6 @@
<code><![CDATA[array{0: int, 1: int, 2: int}]]></code> <code><![CDATA[array{0: int, 1: int, 2: int}]]></code>
</InvalidReturnType> </InvalidReturnType>
</file> </file>
<file src="apps/user_ldap/ajax/getNewServerConfigPrefix.php">
<InvalidScalarArgument>
<code><![CDATA[$ln + 1]]></code>
</InvalidScalarArgument>
</file>
<file src="apps/user_ldap/appinfo/routes.php"> <file src="apps/user_ldap/appinfo/routes.php">
<InvalidScope> <InvalidScope>
<code><![CDATA[$this]]></code> <code><![CDATA[$this]]></code>
@ -1204,12 +1193,6 @@
<code><![CDATA[$decodedValue[1]]]></code> <code><![CDATA[$decodedValue[1]]]></code>
</InvalidArgument> </InvalidArgument>
</file> </file>
<file src="apps/workflowengine/lib/Check/RequestTime.php">
<InvalidScalarArgument>
<code><![CDATA[$hour1]]></code>
<code><![CDATA[$minute1]]></code>
</InvalidScalarArgument>
</file>
<file src="apps/workflowengine/lib/Check/TFileCheck.php"> <file src="apps/workflowengine/lib/Check/TFileCheck.php">
<InvalidArgument> <InvalidArgument>
<code><![CDATA[['app' => Application::APP_ID, 'class' => get_class($subject)]]]></code> <code><![CDATA[['app' => Application::APP_ID, 'class' => get_class($subject)]]]></code>