diff options
Diffstat (limited to 'apps/files_external/lib/Command/Notify.php')
-rw-r--r-- | apps/files_external/lib/Command/Notify.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index a4e7edf0207..0982aa5598b 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -95,7 +95,7 @@ class Notify extends StorageAuthBase { $this->selfTest($storage, $notifyHandler, $output); } - $notifyHandler->listen(function (IChange $change) use ($mount, $output, $dryRun) { + $notifyHandler->listen(function (IChange $change) use ($mount, $output, $dryRun): void { $this->logUpdate($change, $output); if ($change instanceof IRenameChange) { $this->markParentAsOutdated($mount->getId(), $change->getTargetPath(), $output, $dryRun); @@ -136,7 +136,7 @@ class Notify extends StorageAuthBase { $storageIds = array_values(array_unique($storageIds)); if ($dryRun) { - $output->writeln(" dry-run: skipping database write"); + $output->writeln(' dry-run: skipping database write'); } else { $result = $this->updateParent($storageIds, $parent); if ($result === 0) { @@ -168,7 +168,7 @@ class Notify extends StorageAuthBase { } private function getStorageIds(int $mountId, string $path): array { - $pathHash = md5(trim((string)\OC_Util::normalizeUnicode($path), '/')); + $pathHash = md5(trim(\OC_Util::normalizeUnicode($path), '/')); $qb = $this->connection->getQueryBuilder(); return $qb ->select('storage_id', 'user_id') @@ -181,7 +181,7 @@ class Notify extends StorageAuthBase { } private function updateParent(array $storageIds, string $parent): int { - $pathHash = md5(trim((string)\OC_Util::normalizeUnicode($parent), '/')); + $pathHash = md5(trim(\OC_Util::normalizeUnicode($parent), '/')); $qb = $this->connection->getQueryBuilder(); return $qb ->update('filecache') @@ -215,7 +215,7 @@ class Notify extends StorageAuthBase { private function selfTest(IStorage $storage, INotifyHandler $notifyHandler, OutputInterface $output): void { usleep(100 * 1000); //give time for the notify to start if (!$storage->file_put_contents('/.nc_test_file.txt', 'test content')) { - $output->writeln("Failed to create test file for self-test"); + $output->writeln('Failed to create test file for self-test'); return; } $storage->mkdir('/.nc_test_folder'); |