Apply suggestions from code review

Co-Authored-By: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: martink-p <47943787+martink-p@users.noreply.github.com>
This commit is contained in:
martink-p 2019-06-13 14:33:12 +02:00
parent 4b9675df6c
commit 39a4fe40a3
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}