mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
chore: psalm-suppress legacy code weirdness
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
492e6997d8
commit
5d01e0a73c
1 changed files with 12 additions and 2 deletions
|
|
@ -353,27 +353,37 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
|
|||
/**
|
||||
* get a propagator instance for the cache
|
||||
*
|
||||
* @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
|
||||
* @return \OC\Files\Cache\Propagator
|
||||
* @param \OC\Files\Storage\Storage $storage (optional) the storage to pass to the watcher
|
||||
* @return Propagator
|
||||
*/
|
||||
public function getPropagator($storage = null) {
|
||||
if (!$storage) {
|
||||
$storage = $this;
|
||||
}
|
||||
/** @psalm-suppress NoInterfaceProperties The isset check is safe */
|
||||
if (!isset($storage->propagator)) {
|
||||
$config = \OC::$server->getSystemConfig();
|
||||
$storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]);
|
||||
}
|
||||
/** @psalm-suppress NullableReturnStatement False-positive, as the if above avoids this being null */
|
||||
return $storage->propagator;
|
||||
}
|
||||
|
||||
/**
|
||||
* get a propagator instance for the cache
|
||||
*
|
||||
* @param \OC\Files\Storage\Storage $storage (optional) the storage to pass to the watcher
|
||||
* @return Updater
|
||||
*/
|
||||
public function getUpdater($storage = null) {
|
||||
if (!$storage) {
|
||||
$storage = $this;
|
||||
}
|
||||
/** @psalm-suppress NoInterfaceProperties The isset check is safe */
|
||||
if (!isset($storage->updater)) {
|
||||
$storage->updater = new Updater($storage);
|
||||
}
|
||||
/** @psalm-suppress NullableReturnStatement False-positive, as the if above avoids this being null */
|
||||
return $storage->updater;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue