Fix some RedundantCast in dav code

For #25641

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2021-02-15 20:50:28 +01:00
parent c45dc502ca
commit df4c2508d6
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;
}