mirror of
https://github.com/nextcloud/mail.git
synced 2026-01-13 20:23:59 +00:00
41 lines
727 B
PHP
41 lines
727 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Mail\IMAP;
|
|
|
|
use JsonSerializable;
|
|
use ReturnTypeWillChange;
|
|
|
|
final class MailboxStats implements JsonSerializable {
|
|
private int $total;
|
|
private int $unread;
|
|
|
|
public function __construct(int $total, int $unread) {
|
|
$this->total = $total;
|
|
$this->unread = $unread;
|
|
}
|
|
|
|
public function getTotal(): int {
|
|
return $this->total;
|
|
}
|
|
|
|
public function getUnread(): int {
|
|
return $this->unread;
|
|
}
|
|
|
|
#[\Override]
|
|
#[ReturnTypeWillChange]
|
|
public function jsonSerialize() {
|
|
return [
|
|
'total' => $this->total,
|
|
'unread' => $this->unread,
|
|
];
|
|
}
|
|
}
|