Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix psalm issues
Signed-off-by: Carl Schwan <[email protected]>
  • Loading branch information
CarlSchwan authored and backportbot[bot] committed Jan 14, 2022
commit 396157af18370a4dd8114a958c5cfe2da6f50393
5 changes: 4 additions & 1 deletion apps/workflowengine/lib/Check/FileSystemTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
if ($groupFolderStorage === null) {
throw new \LogicException('Should not happen: Storage is instance of GroupFolderStorage but no group folder storage found while unwrapping.');
}
/** @psalm-suppress UndefinedMethod */
/**
* @psalm-suppress UndefinedDocblockClass
* @psalm-suppress UndefinedInterfaceMethod
*/
$cacheId = $cache->getNumericStorageId() . '/' . $groupFolderStorage->getFolderId();
} else {
$cacheId = $cache->getNumericStorageId();
Expand Down
12 changes: 6 additions & 6 deletions lib/private/Files/Storage/Wrapper/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,19 +499,19 @@ public function instanceOfStorage($class) {
}

/**
* @template T of IStorage
* @param class-string<T> $class
* @return ?T
* @psalm-template T of IStorage
* @psalm-param class-string<T> $class
* @psalm-return T|null
*/
public function getInstanceOfStorage(string $class): ?IStorage {
public function getInstanceOfStorage(string $class) {
$storage = $this;
while ($storage->instanceOfStorage(Wrapper::class)) {
while ($storage instanceof Wrapper) {
if ($storage instanceof $class) {
break;
}
$storage = $storage->getWrapperStorage();
}
if (!is_a($storage, $class)) {
if (!($storage instanceof $class)) {
return null;
}
return $storage;
Expand Down