aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-07-04 22:35:40 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-07-12 18:29:32 +0330
commitb8870658fb0c1e7661c99affa2999941be6a0139 (patch)
treefa16a51bcba0f1dd72f96df38d4c1a33e7a3f3fd /apps/files/lib/Command
parent5d242aa2f86f003bb5f0400188a440d2d5eea68f (diff)
downloadnextcloud-server-b8870658fb0c1e7661c99affa2999941be6a0139.tar.gz
nextcloud-server-b8870658fb0c1e7661c99affa2999941be6a0139.zip
Fixes Psalm's "LessSpecificReturnStatement" error.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'apps/files/lib/Command')
-rw-r--r--apps/files/lib/Command/ScanAppData.php5
1 files changed, 3 insertions, 2 deletions
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('<error>NoAppData folder found</error>');
@@ -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) {