Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs(caldav): improve documentation of CalDavBackend::getCalendarsFor…
…UserCount

Signed-off-by: Richard Steinmetz <[email protected]>
  • Loading branch information
st3iny authored and AndyScherzinger committed Jun 12, 2025
commit 3f631400f747e1c3b000b314d3c0f5a36daeb355
10 changes: 4 additions & 6 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,13 @@ public function __construct(
}

/**
* Return the number of calendars for a principal
* Return the number of calendars owned by the given principal.
*
* By default this excludes the automatically generated birthday calendar
* Calendars shared with the given principal are not counted!
*
* @param $principalUri
* @param bool $excludeBirthday
* @return int
* By default, this excludes the automatically generated birthday calendar.
*/
public function getCalendarsForUserCount($principalUri, $excludeBirthday = true) {
public function getCalendarsForUserCount(string $principalUri, bool $excludeBirthday = true): int {
$principalUri = $this->convertPrincipal($principalUri, true);
$query = $this->db->getQueryBuilder();
$query->select($query->func()->count('*'))
Expand Down
Loading