Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
martink-p and kesselb authored Jun 13, 2019
1 parent e320ee4 commit 5cc7d49
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/private/Files/Stream/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,18 +317,18 @@ public function stream_read($count) {
}

/**
* 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;
}
Expand Down

0 comments on commit 5cc7d49

Please sign in to comment.