mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
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:
parent
f659e1edb4
commit
27c7164e86
7 changed files with 14 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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}> */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue