Skip to content

Commit b9ec6ad

Browse files
committed
psalm fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 20993af commit b9ec6ad

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/encryption/lib/Command/FixKeyLocation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public function findUserKeyForSystemFileByName(IUser $user, File $node): ?string
238238
*
239239
* @param string $basePath
240240
* @param string $name
241-
* @return \Generator<string>
241+
* @return \Iterator<mixed, string>
242242
*/
243243
public function findKeysByFileName(string $basePath, string $name) {
244244
$allKeys = $this->repair->findAllKeysInDirectory($basePath);

apps/encryption/lib/Repair.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public function getUserKeyRoot(IUser $user): string {
6969
}
7070

7171
public function tryReadFile(File $node): bool {
72-
$this->keyStorage->clearKeyCache();
72+
if ($this->keyStorage instanceof Storage) {
73+
$this->keyStorage->clearKeyCache();
74+
}
7375
try {
7476
$fh = $node->fopen('r');
7577
// read a single chunk
@@ -265,7 +267,7 @@ public function getKeyPath(IUser $user, Node $node): string {
265267
if ($this->needsSystemKey($node->getPath())) {
266268
return $this->getSystemKeyPath($node);
267269
} else {
268-
return $this->getUserKeyRoot($user, $node);
270+
return $this->getUserKeyRoot($user);
269271
}
270272
}
271273

0 commit comments

Comments
 (0)