diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-02-15 22:04:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 22:04:46 +0100 |
commit | d6e34b5045782fac930a6d35939fa072e9511196 (patch) | |
tree | 841e802476338ba3b471b318c96c79c2f33fc731 /apps/dav | |
parent | 4a801f39ee9d8ccb59b773e744ebef67e9ca6747 (diff) | |
parent | df4c2508d64822e448bf2f8b9e4c84d4877c4725 (diff) | |
download | nextcloud-server-d6e34b5045782fac930a6d35939fa072e9511196.tar.gz nextcloud-server-d6e34b5045782fac930a6d35939fa072e9511196.zip |
Merge pull request #25664 from nextcloud/fix/psalm/dav_casts
Fix some RedundantCast in dav code
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 0cceeae12dc..6b84512fc93 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -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', [ diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index 6e45affb3fe..e25f42c31e7 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -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; } |