aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-01-11 12:57:03 +0100
committerMorris Jobke <hey@morrisjobke.de>2021-01-11 13:14:41 +0100
commit24d436cb600a725ba162a5387552a996a6fc486f (patch)
tree91e00673fad2c999776991ca57d09e8af9a10ed5 /apps/dav/lib
parent8b656e321bbf358d8074ce8a3976fac5defdece0 (diff)
downloadnextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.tar.gz
nextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.zip
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Calendar.php10
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Event.php4
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Todo.php4
-rw-r--r--apps/dav/lib/CalDAV/Publishing/PublishPlugin.php2
4 files changed, 10 insertions, 10 deletions
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
index 7e762b4c088..382825d8955 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
@@ -229,32 +229,32 @@ class Calendar extends Base {
case self::SUBJECT_UNSHARE_USER . '_self':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_USER . '_you':
case self::SUBJECT_UNSHARE_USER . '_you':
return [
'user' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_USER . '_by':
case self::SUBJECT_UNSHARE_USER . '_by':
return [
'user' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'actor' => $this->generateUserParameter($parameters[2]),
];
case self::SUBJECT_SHARE_GROUP . '_you':
case self::SUBJECT_UNSHARE_GROUP . '_you':
return [
'group' => $this->generateGroupParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
];
case self::SUBJECT_SHARE_GROUP . '_by':
case self::SUBJECT_UNSHARE_GROUP . '_by':
return [
'group' => $this->generateGroupParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'actor' => $this->generateUserParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index 4aa2c8c0b0e..8850715a1c5 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -195,14 +195,14 @@ class Event extends Base {
case self::SUBJECT_OBJECT_UPDATE . '_event':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'event' => $this->generateObjectParameter($parameters[2]),
];
case self::SUBJECT_OBJECT_ADD . '_event_self':
case self::SUBJECT_OBJECT_DELETE . '_event_self':
case self::SUBJECT_OBJECT_UPDATE . '_event_self':
return [
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'event' => $this->generateObjectParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
index 64f542b9f7e..2f6c088be0a 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
@@ -127,7 +127,7 @@ class Todo extends Event {
case self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action':
return [
'actor' => $this->generateUserParameter($parameters[0]),
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'todo' => $this->generateObjectParameter($parameters[2]),
];
case self::SUBJECT_OBJECT_ADD . '_todo_self':
@@ -136,7 +136,7 @@ class Todo extends Event {
case self::SUBJECT_OBJECT_UPDATE . '_todo_completed_self':
case self::SUBJECT_OBJECT_UPDATE . '_todo_needs_action_self':
return [
- 'calendar' => $this->generateLegacyCalendarParameter((int)$event->getObjectId(), $parameters[1]),
+ 'calendar' => $this->generateLegacyCalendarParameter($event->getObjectId(), $parameters[1]),
'todo' => $this->generateObjectParameter($parameters[2]),
];
}
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
index f34baffd784..e5ae9064ae7 100644
--- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
+++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
@@ -138,7 +138,7 @@ class PublishPlugin extends ServerPlugin {
$canPublish &= ($node->getOwner() === $node->getPrincipalURI());
}
- return new AllowedSharingModes((bool)$canShare, (bool)$canPublish);
+ return new AllowedSharingModes($canShare, $canPublish);
});
}
}