fix: use interfaces instead of classes in Cache\Watcher type hints

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2025-11-20 18:55:01 +01:00
parent 2948aaf2f9
commit bb67e9ece2
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -7,8 +7,11 @@
*/
namespace OC\Files\Cache;
use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Cache\IScanner;
use OCP\Files\Cache\IWatcher;
use OCP\Files\Storage\IStorage;
/**
* check the storage backends for updates and change the cache accordingly
@ -19,17 +22,17 @@ class Watcher implements IWatcher {
protected $checkedPaths = [];
/**
* @var \OC\Files\Storage\Storage $storage
* @var IStorage $storage
*/
protected $storage;
/**
* @var Cache $cache
* @var ICache $cache
*/
protected $cache;
/**
* @var Scanner $scanner ;
* @var IScanner $scanner ;
*/
protected $scanner;
@ -38,10 +41,7 @@ class Watcher implements IWatcher {
protected ?string $checkFilter = null;
/**
* @param \OC\Files\Storage\Storage $storage
*/
public function __construct(\OC\Files\Storage\Storage $storage) {
public function __construct(IStorage $storage) {
$this->storage = $storage;
$this->cache = $storage->getCache();
$this->scanner = $storage->getScanner();