/**
* {@inheritDoc}
*/
- public function getEstimatedExportSize(IUser $user): int {
+ public function getEstimatedExportSize(IUser $user): int|float {
$calendarExports = $this->getCalendarExports($user, new NullOutput());
$calendarCount = count($calendarExports);
// 450B for each component (events, todos, alarms, etc.)
$size += ($componentCount * 450) / 1024;
- return (int)ceil($size);
+ return ceil($size);
}
/**
/**
* {@inheritDoc}
*/
- public function getEstimatedExportSize(IUser $user): int {
+ public function getEstimatedExportSize(IUser $user): int|float {
$addressBookExports = $this->getAddressBookExports($user, new NullOutput());
$addressBookCount = count($addressBookExports);
// 350B for each contact
$size += ($contactsCount * 350) / 1024;
- return (int)ceil($size);
+ return ceil($size);
}
/**
/**
* {@inheritDoc}
*/
- public function getEstimatedExportSize(IUser $user): int {
+ public function getEstimatedExportSize(IUser $user): int|float {
$uid = $user->getUID();
try {
if (!$trashbinFolder instanceof Folder) {
return 0;
}
- return (int)ceil($trashbinFolder->getSize() / 1024);
+ return ceil($trashbinFolder->getSize() / 1024);
} catch (\Throwable $e) {
return 0;
}
/**
* {@inheritDoc}
*/
- public function getEstimatedExportSize(IUser $user): int {
+ public function getEstimatedExportSize(IUser $user): int|float {
$size = 100; // 100KiB for account JSON
try {
// Skip avatar in size estimate on failure
}
- return (int)ceil($size);
+ return ceil($size);
}
/**
* Should be fast, favor performance over accuracy.
*
* @since 25.0.0
+ * @since 27.0.0 return value may overflow from int to float
*/
- public function getEstimatedExportSize(IUser $user): int;
+ public function getEstimatedExportSize(IUser $user): int|float;
}