diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-20 17:38:36 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-20 17:51:00 +0200 |
commit | 1a4978c4ead55daa2726df5967c1377d61a57f7a (patch) | |
tree | 88c8a82ed52b8698be9e0cd4e9cef29b3c0d8ea1 /apps/files_external/lib/Lib/Storage | |
parent | 6db9cbfdeb7dd475a258c1c2f2c163c41856d6c2 (diff) | |
download | nextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.tar.gz nextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.zip |
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_external/lib/Lib/Storage')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 6 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/FTP.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 2 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/Swift.php | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 43646ac681a..5325b25a66b 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -474,7 +474,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); $handle = fopen($tmpFile, 'w'); - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { + return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile): void { $this->writeBack($tmpFile, $path); }); case 'a': @@ -499,7 +499,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { } $handle = fopen($tmpFile, $mode); - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { + return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile): void { $this->writeBack($tmpFile, $path); }); } @@ -760,7 +760,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { if ($size === null) { $size = 0; // track the number of bytes read from the input stream to return as the number of written bytes. - $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size) { + $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size): void { $size = $writtenSize; }); } diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index d1f67c5a741..a7a348cbf43 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -277,7 +277,7 @@ class FTP extends Common { $tmpFile = \OC::$server->getTempManager()->getTemporaryFile(); } $source = fopen($tmpFile, $mode); - return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $path) { + return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $path): void { $this->writeStream($path, fopen($tmpFile, 'r')); unlink($tmpFile); }); @@ -287,7 +287,7 @@ class FTP extends Common { public function writeStream(string $path, $stream, ?int $size = null): int { if ($size === null) { - $stream = CountWrapper::wrap($stream, function ($writtenSize) use (&$size) { + $stream = CountWrapper::wrap($stream, function ($writtenSize) use (&$size): void { $size = $writtenSize; }); } diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index acc531341d9..a6a28245214 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -478,7 +478,7 @@ class SFTP extends Common { public function writeStream(string $path, $stream, ?int $size = null): int { if ($size === null) { - $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size) { + $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size): void { $size = $writtenSize; }); if (!$stream) { diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index bd871626bd9..7517c180e37 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -458,7 +458,7 @@ class SMB extends Common implements INotifyStorage { case 'w': case 'wb': $source = $this->share->write($fullPath); - return CallBackWrapper::wrap($source, null, null, function () use ($fullPath) { + return CallBackWrapper::wrap($source, null, null, function () use ($fullPath): void { unset($this->statCache[$fullPath]); }); case 'a': @@ -490,7 +490,7 @@ class SMB extends Common implements INotifyStorage { } $source = fopen($tmpFile, $mode); $share = $this->share; - return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share) { + return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath, $share): void { unset($this->statCache[$fullPath]); $share->put($tmpFile, $fullPath); unlink($tmpFile); diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 64b3179efef..9aabf5b56b4 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -414,7 +414,7 @@ class Swift extends \OC\Files\Storage\Common { file_put_contents($tmpFile, $source); } $handle = fopen($tmpFile, $mode); - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { + return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile): void { $this->writeBack($tmpFile, $path); }); } |