From 39a4fe40a3f6fb7057509e2aef7572e13749ff29 Mon Sep 17 00:00:00 2001 From: martink-p <47943787+martink-p@users.noreply.github.com> Date: Thu, 13 Jun 2019 14:33:12 +0200 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Daniel Kesselberg Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com> --- lib/private/Files/Stream/Encryption.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php index bdbbc8a06f..99eaff6a9c 100644 --- a/lib/private/Files/Stream/Encryption.php +++ b/lib/private/Files/Stream/Encryption.php @@ -317,18 +317,18 @@ class Encryption extends Wrapper { } /** - * stream_read wrapper to read complete requested block - */ - private function stream_read_block($blockSize) { + * stream_read wrapper to read complete requested block + */ + private function stream_read_block(int $blockSize): string { $remaining = $blockSize; - $data = ""; + $data = ''; do { $chunk = parent::stream_read($remaining); $chunk_len = strlen($chunk); $data .= $chunk; $remaining -= $chunk_len; - } while ( ($remaining > 0) && ($chunk_len > 0) ); + } while (($remaining > 0) && ($chunk_len > 0)); return $data; }