Merge pull request #25664 from nextcloud/fix/psalm/dav_casts

Fix some RedundantCast in dav code
This commit is contained in:
Roeland Jago Douma 2021-02-15 22:04:46 +01:00 committed by GitHub
commit d6e34b5045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -2158,10 +2158,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->values($valuesToInsert)
->execute();
$subscriptionId = $this->db->lastInsertId('*PREFIX*calendarsubscriptions');
$subscriptionId = $query->getLastInsertId();
$subscriptionRow = $this->getSubscriptionById($subscriptionId);
$this->dispatcher->dispatchTyped(new SubscriptionCreatedEvent((int)$subscriptionId, $subscriptionRow));
$this->dispatcher->dispatchTyped(new SubscriptionCreatedEvent($subscriptionId, $subscriptionRow));
$this->legacyDispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::createSubscription', new GenericEvent(
'\OCA\DAV\CalDAV\CalDavBackend::createSubscription',
[

View File

@ -130,7 +130,7 @@ class AppleProvisioningPlugin extends ServerPlugin {
$absoluteURL = $this->urlGenerator->getBaseUrl();
$parsedUrl = parse_url($absoluteURL);
if (isset($parsedUrl['port'])) {
$serverPort = (int) $parsedUrl['port'];
$serverPort = $parsedUrl['port'];
} else {
$serverPort = 443;
}