]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixes Psalm's "LessSpecificReturnStatement" error.
authorFaraz Samapoor <f.samapoor@gmail.com>
Tue, 4 Jul 2023 19:05:40 +0000 (22:35 +0330)
committerFaraz Samapoor <fsa@adlas.at>
Wed, 12 Jul 2023 14:59:32 +0000 (18:29 +0330)
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
apps/files/lib/Command/ScanAppData.php

index ddd3986aa288f0790c62ed47b27df237d63102ad..b646251539e2e120de2697aaf41fb407e42a530d 100644 (file)
@@ -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) {