From 44afd9c8b7b21db4169e13fda0cd67fc219d0316 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 15 Aug 2024 00:08:16 +0200 Subject: [PATCH] fix: lint Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- lib/private/Files/Storage/Local.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 41bac73d8bf81..cc828b1371f81 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -400,20 +400,19 @@ public function fopen($path, $mode) { return $result; } - /** @return string|false */ public function hash($type, $path, $raw = false): string|false { $sourcePath = $this->getSourcePath($path); if (!file_exists($sourcePath) || !is_readable($sourcePath)) { \OC::$server->get(LoggerInterface::class)->error('Source path does not exist or is not readable: ' . $sourcePath, ['app' => 'core']); return false; } - + $validAlgorithms = hash_algos(); if (!in_array($type, $validAlgorithms)) { \OC::$server->get(LoggerInterface::class)->error('Invalid hash algorithm: ' . $type, ['app' => 'core']); return false; } - + return hash_file($type, $sourcePath, $raw); }