-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(psalm): Add missing stubs for tests
Signed-off-by: provokateurin <kate@provokateurin.de>
- Loading branch information
1 parent
ad1c43a
commit 261f85c
Showing
8 changed files
with
853 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
namespace OC\Files; | ||
|
||
use OC\Files\Config\MountProviderCollection; | ||
use OC\Files\Mount\HomeMountPoint; | ||
use OC\Files\Mount\MountPoint; | ||
use OC\Files\Storage\Common; | ||
use OC\Files\Storage\Home; | ||
use OC\Files\Storage\Storage; | ||
use OC\Files\Storage\Wrapper\Availability; | ||
use OC\Files\Storage\Wrapper\Encoding; | ||
use OC\Files\Storage\Wrapper\PermissionsMask; | ||
use OC\Files\Storage\Wrapper\Quota; | ||
use OC\Lockdown\Filesystem\NullStorage; | ||
use OC\Share\Share; | ||
use OC\Share20\ShareDisableChecker; | ||
use OC_App; | ||
use OC_Hook; | ||
use OC_Util; | ||
use OCA\Files_External\Config\ConfigAdapter; | ||
use OCA\Files_Sharing\External\Mount; | ||
use OCA\Files_Sharing\ISharedMountPoint; | ||
use OCA\Files_Sharing\SharedMount; | ||
use OCP\Constants; | ||
use OCP\Diagnostics\IEventLogger; | ||
use OCP\EventDispatcher\IEventDispatcher; | ||
use OCP\Files\Config\ICachedMountInfo; | ||
use OCP\Files\Config\IHomeMountProvider; | ||
use OCP\Files\Config\IMountProvider; | ||
use OCP\Files\Config\IUserMountCache; | ||
use OCP\Files\Events\InvalidateMountCacheEvent; | ||
use OCP\Files\Events\Node\FilesystemTornDownEvent; | ||
use OCP\Files\Mount\IMountManager; | ||
use OCP\Files\Mount\IMountPoint; | ||
use OCP\Files\NotFoundException; | ||
use OCP\Files\Storage\IStorage; | ||
use OCP\Group\Events\UserAddedEvent; | ||
use OCP\Group\Events\UserRemovedEvent; | ||
use OCP\ICache; | ||
use OCP\ICacheFactory; | ||
use OCP\IConfig; | ||
use OCP\IUser; | ||
use OCP\IUserManager; | ||
use OCP\IUserSession; | ||
use OCP\Lockdown\ILockdownManager; | ||
use OCP\Share\Events\ShareCreatedEvent; | ||
use Psr\Log\LoggerInterface; | ||
|
||
class SetupManager { | ||
public function __construct(private IEventLogger $eventLogger, private MountProviderCollection $mountProviderCollection, private IMountManager $mountManager, private IUserManager $userManager, private IEventDispatcher $eventDispatcher, private IUserMountCache $userMountCache, private ILockdownManager $lockdownManager, private IUserSession $userSession, ICacheFactory $cacheFactory, private LoggerInterface $logger, private IConfig $config, private ShareDisableChecker $shareDisableChecker) | ||
{ | ||
} | ||
|
||
public function isSetupComplete(IUser $user): bool | ||
{ | ||
} | ||
|
||
/** | ||
* Setup the full filesystem for the specified user | ||
*/ | ||
public function setupForUser(IUser $user): void | ||
{ | ||
} | ||
|
||
/** | ||
* Set up the root filesystem | ||
*/ | ||
public function setupRoot(): void | ||
{ | ||
} | ||
|
||
/** | ||
* Set up the filesystem for the specified path | ||
*/ | ||
public function setupForPath(string $path, bool $includeChildren = false): void | ||
{ | ||
} | ||
|
||
/** | ||
* @param string $path | ||
* @param string[] $providers | ||
*/ | ||
public function setupForProvider(string $path, array $providers): void | ||
{ | ||
} | ||
|
||
public function tearDown() | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
<?php | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
namespace OC\Files\Storage; | ||
|
||
use OC\Files\Filesystem; | ||
use OC\Files\Storage\Wrapper\Encryption; | ||
use OC\Files\Storage\Wrapper\Jail; | ||
use OCP\Constants; | ||
use OCP\Files\ForbiddenException; | ||
use OCP\Files\GenericFileException; | ||
use OCP\Files\IMimeTypeDetector; | ||
use OCP\Files\Storage\IStorage; | ||
use OCP\Files\StorageNotAvailableException; | ||
use OCP\IConfig; | ||
use OCP\Util; | ||
use Psr\Log\LoggerInterface; | ||
|
||
/** | ||
* for local filestore, we only have to map the paths | ||
*/ | ||
class Local extends \OC\Files\Storage\Common { | ||
protected $datadir; | ||
|
||
protected $dataDirLength; | ||
|
||
protected $realDataDir; | ||
|
||
protected bool $unlinkOnTruncate; | ||
|
||
protected bool $caseInsensitive = false; | ||
|
||
public function __construct($arguments) | ||
{ | ||
} | ||
|
||
public function __destruct() { | ||
} | ||
|
||
public function getId() | ||
{ | ||
} | ||
|
||
public function mkdir($path) | ||
{ | ||
} | ||
|
||
public function rmdir($path) | ||
{ | ||
} | ||
|
||
public function opendir($path) | ||
{ | ||
} | ||
|
||
public function is_dir($path) | ||
{ | ||
} | ||
|
||
public function is_file($path) | ||
{ | ||
} | ||
|
||
public function stat($path) | ||
{ | ||
} | ||
|
||
public function getMetaData($path) | ||
{ | ||
} | ||
|
||
public function filetype($path) | ||
{ | ||
} | ||
|
||
public function filesize($path): false|int|float | ||
{ | ||
} | ||
|
||
public function isReadable($path) | ||
{ | ||
} | ||
|
||
public function isUpdatable($path) | ||
{ | ||
} | ||
|
||
public function file_exists($path) | ||
{ | ||
} | ||
|
||
public function filemtime($path) | ||
{ | ||
} | ||
|
||
public function touch($path, $mtime = null) | ||
{ | ||
} | ||
|
||
public function file_get_contents($path) | ||
{ | ||
} | ||
|
||
public function file_put_contents($path, $data) | ||
{ | ||
} | ||
|
||
public function unlink($path) | ||
{ | ||
} | ||
|
||
public function rename($source, $target): bool | ||
{ | ||
} | ||
|
||
public function copy($source, $target) | ||
{ | ||
} | ||
|
||
public function fopen($path, $mode) | ||
{ | ||
} | ||
|
||
public function hash($type, $path, $raw = false): string|false | ||
{ | ||
} | ||
|
||
public function free_space($path) | ||
{ | ||
} | ||
|
||
public function search($query) | ||
{ | ||
} | ||
|
||
public function getLocalFile($path) | ||
{ | ||
} | ||
|
||
/** | ||
* @param string $query | ||
* @param string $dir | ||
* @return array | ||
*/ | ||
protected function searchInDir($query, $dir = '') | ||
{ | ||
} | ||
|
||
/** | ||
* check if a file or folder has been updated since $time | ||
* | ||
* @param string $path | ||
* @param int $time | ||
* @return bool | ||
*/ | ||
public function hasUpdated($path, $time) | ||
{ | ||
} | ||
|
||
/** | ||
* Get the source path (on disk) of a given path | ||
* | ||
* @param string $path | ||
* @return string | ||
* @throws ForbiddenException | ||
*/ | ||
public function getSourcePath($path) | ||
{ | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function isLocal() | ||
{ | ||
} | ||
|
||
public function getETag($path) | ||
{ | ||
} | ||
|
||
/** | ||
* @param IStorage $sourceStorage | ||
* @param string $sourceInternalPath | ||
* @param string $targetInternalPath | ||
* @param bool $preserveMtime | ||
* @return bool | ||
*/ | ||
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) | ||
{ | ||
} | ||
|
||
/** | ||
* @param IStorage $sourceStorage | ||
* @param string $sourceInternalPath | ||
* @param string $targetInternalPath | ||
* @return bool | ||
*/ | ||
public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) | ||
{ | ||
} | ||
|
||
public function writeStream(string $path, $stream, ?int $size = null): int | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
/** | ||
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
namespace OC\Files\Storage; | ||
|
||
/** | ||
* local storage backend in temporary folder for testing purpose | ||
*/ | ||
class Temporary extends Local { | ||
public function __construct($arguments = []) | ||
{ | ||
} | ||
|
||
public function cleanUp() | ||
{ | ||
} | ||
|
||
public function __destruct() | ||
{ | ||
} | ||
|
||
public function getDataDir() | ||
{ | ||
} | ||
} |
Oops, something went wrong.