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:
parent
4b9675df6c
commit
39a4fe40a3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue