chore: add psalm-api to for classes we need to mock in unit tests

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-04-28 23:52:43 +02:00
parent f659e1edb4
commit 27c7164e86
No known key found for this signature in database
GPG key ID: 7E849AE05218500F
7 changed files with 14 additions and 0 deletions

View file

@ -17,6 +17,9 @@ use OCP\DB\Exception;
use OCP\IGroup;
use Throwable;
/**
* @psalm-api - we cannot use final as this will break unit tests
*/
readonly class AuthorizedGroupService {
public function __construct(
private AuthorizedGroupMapper $mapper,

View file

@ -15,6 +15,9 @@ use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;
/**
* @psalm-api - we cannot use final as this will break unit tests
*/
class ExpirePreviewsJob extends TimedJob {
public function __construct(
ITimeFactory $time,

View file

@ -26,6 +26,7 @@ use Psr\Log\LoggerInterface;
* A mapping between the two storage ids is stored in the database and accessible through this class
*
* @package OC\Files\Cache
* @psalm-api
*/
class Storage {
private string $storageId;

View file

@ -21,6 +21,7 @@ use OCP\IDBConnection;
* A mapping between the two storage ids is stored in the database and accessible through this class
*
* @package OC\Files\Cache
* @psalm-api
*/
class StorageGlobal {
/** @var array<string, array{id: string, numeric_id: int, available: bool, last_checked: int}> */

View file

@ -16,6 +16,8 @@ use OCP\AppFramework\Db\Entity;
* @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;

View file

@ -21,6 +21,7 @@ use OCP\Server;
/**
* @template-extends QBMapper<AuthorizedGroup>
* @psalm-api - we cannot use final as this will break unit tests
*/
class AuthorizedGroupMapper extends QBMapper {
public function __construct(IDBConnection $db) {

View file

@ -16,6 +16,9 @@ use OCP\Share\IManager;
use OCP\Share\IShareHelper;
use Override;
/**
* @psalm-api - we cannot use final as this will break unit tests
*/
class ShareHelper implements IShareHelper {
public function __construct(
private readonly IManager $shareManager,