diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-05 12:01:12 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-05 12:01:12 +0100 |
commit | cb0450b5c4fbe590e7b35284a40d78d96a0251f6 (patch) | |
tree | 6712e143e55ae20e0a4d0740ec350614c637d4f1 /apps/dav/lib | |
parent | e29720f9b2aaf7467acdcfe3c9dde9eceda2e3bf (diff) | |
download | nextcloud-server-cb0450b5c4fbe590e7b35284a40d78d96a0251f6.tar.gz nextcloud-server-cb0450b5c4fbe590e7b35284a40d78d96a0251f6.zip |
Improve typing on new methods
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/CalDAV/CalendarImpl.php | 11 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php | 3 |
2 files changed, 6 insertions, 8 deletions
diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index f9e9c584808..3fb28a631a7 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -42,7 +42,6 @@ use Sabre\VObject\Reader; use function Sabre\Uri\split as uriSplit; class CalendarImpl implements ICreateFromString, IHandleImipMessage { - private CalDavBackend $backend; private Calendar $calendar; /** @var array<string, mixed> */ @@ -204,25 +203,25 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage { /** @var VEvent $vEvent */ $vEvent = $vObject->{'VEVENT'}; - if($vObject->{'METHOD'} === null) { + if ($vObject->{'METHOD'} === null) { throw new CalendarException('No Method provided for scheduling data. Could not process message'); } - if(!isset($vEvent->{'ORGANIZER'}) || !isset($vEvent->{'ATTENDEE'})) { + if (!isset($vEvent->{'ORGANIZER'}) || !isset($vEvent->{'ATTENDEE'})) { throw new CalendarException('Could not process scheduling data, neccessary data missing from ICAL'); } $organizer = $vEvent->{'ORGANIZER'}->getValue(); $attendee = $vEvent->{'ATTENDEE'}->getValue(); $iTipMessage->method = $vObject->{'METHOD'}->getValue(); - if($iTipMessage->method === 'REPLY') { + if ($iTipMessage->method === 'REPLY') { if ($server->isExternalAttendee($vEvent->{'ATTENDEE'}->getValue())) { $iTipMessage->recipient = $organizer; } else { $iTipMessage->recipient = $attendee; } $iTipMessage->sender = $attendee; - } else if($iTipMessage->method === 'CANCEL') { + } elseif ($iTipMessage->method === 'CANCEL') { $iTipMessage->recipient = $attendee; $iTipMessage->sender = $organizer; } @@ -233,7 +232,7 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage { $schedulingPlugin->scheduleLocalDelivery($iTipMessage); } - public function getInvitationResponseServer() { + public function getInvitationResponseServer(): InvitationResponseServer { return new InvitationResponseServer(false); } } diff --git a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php index c2e31f7bdc4..e64c815753b 100644 --- a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php +++ b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php @@ -39,7 +39,6 @@ use Psr\Log\LoggerInterface; use Sabre\VObject\ITip\Message; class InvitationResponseServer { - /** @var \OCA\DAV\Connector\Sabre\Server */ public $server; @@ -131,7 +130,7 @@ class InvitationResponseServer { return $aclPlugin->getPrincipalByUri($principalUri) === null; } - public function getServer() { + public function getServer(): \OCA\DAV\Connector\Sabre\Server { return $this->server; } } |