nextcloud/lib/private/Settings/AuthorizedGroup.php
Ferdinand Thiessen 27c7164e86
chore: add psalm-api to for classes we need to mock in unit tests
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-28 23:52:43 +02:00

40 lines
811 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Settings;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
/**
* @method setGroupId(string $groupId)
* @method setClass(string $class)
* @method string getGroupId()
* @method string getClass()
*
* @psalm-api - we cannot use final as this will break unit tests
*/
class AuthorizedGroup extends Entity implements JsonSerializable {
public $id;
protected ?string $groupId = null;
protected ?string $class = null;
/**
* @return array<string, mixed>
*/
#[\Override]
public function jsonSerialize(): array {
return [
'id' => $this->getId(),
'group_id' => $this->groupId,
'class' => $this->class
];
}
}