From: Faraz Samapoor Date: Tue, 4 Jul 2023 19:05:40 +0000 (+0330) Subject: Fixes Psalm's "LessSpecificReturnStatement" error. X-Git-Tag: v28.0.0beta1~609^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b8870658fb0c1e7661c99affa2999941be6a0139;p=nextcloud-server.git Fixes Psalm's "LessSpecificReturnStatement" error. Signed-off-by: Faraz Samapoor --- diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php index ddd3986aa28..b646251539e 100644 --- a/apps/files/lib/Command/ScanAppData.php +++ b/apps/files/lib/Command/ScanAppData.php @@ -36,6 +36,7 @@ use OC\DB\ConnectionAdapter; use OC\ForbiddenException; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; +use OCP\Files\Node; use OCP\Files\NotFoundException; use OCP\Files\StorageNotAvailableException; use OCP\IConfig; @@ -71,6 +72,7 @@ class ScanAppData extends Base { protected function scanFiles(OutputInterface $output, string $folder): int { try { + /** @var \OCP\Files\Folder $appData */ $appData = $this->getAppDataFolder(); } catch (NotFoundException $e) { $output->writeln('NoAppData folder found'); @@ -251,10 +253,9 @@ class ScanAppData extends Base { } /** - * @return \OCP\Files\Folder * @throws NotFoundException */ - private function getAppDataFolder() { + private function getAppDataFolder(): Node { $instanceId = $this->config->getSystemValue('instanceid', null); if ($instanceId === null) {