summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Stream/Encryption.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Stream/Encryption.php')
-rw-r--r--lib/private/Files/Stream/Encryption.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Files/Stream/Encryption.php b/lib/private/Files/Stream/Encryption.php
index 980be6d043e..76668b14008 100644
--- a/lib/private/Files/Stream/Encryption.php
+++ b/lib/private/Files/Stream/Encryption.php
@@ -432,7 +432,7 @@ class Encryption extends Wrapper {
public function stream_close() {
$this->flush('end');
- $position = (int)floor($this->position/$this->unencryptedBlockSize);
+ $position = (int)floor($this->position / $this->unencryptedBlockSize);
$remainingData = $this->encryptionModule->end($this->fullPath, $position . 'end');
if ($this->readOnly === false) {
if (!empty($remainingData)) {
@@ -465,7 +465,7 @@ class Encryption extends Wrapper {
// automatically attempted when the file is written to disk -
// we are handling that separately here and we don't want to
// get into an infinite loop
- $position = (int)floor($this->position/$this->unencryptedBlockSize);
+ $position = (int)floor($this->position / $this->unencryptedBlockSize);
$encrypted = $this->encryptionModule->encrypt($this->cache, $position . $positionPrefix);
$bytesWritten = parent::stream_write($encrypted);
$this->writeFlag = false;
@@ -473,8 +473,8 @@ class Encryption extends Wrapper {
// If so then update the encrypted filesize
// Note that the unencrypted pointer and filesize are NOT yet updated when flush() is called
// We recalculate the encrypted filesize as we do not know the context of calling flush()
- $completeBlocksInFile=(int)floor($this->unencryptedSize/$this->unencryptedBlockSize);
- if ($completeBlocksInFile === (int)floor($this->position/$this->unencryptedBlockSize)) {
+ $completeBlocksInFile = (int)floor($this->unencryptedSize / $this->unencryptedBlockSize);
+ if ($completeBlocksInFile === (int)floor($this->position / $this->unencryptedBlockSize)) {
$this->size = $this->util->getBlockSize() * $completeBlocksInFile;
$this->size += $bytesWritten;
$this->size += $this->headerSize;
@@ -493,7 +493,7 @@ class Encryption extends Wrapper {
if ($this->cache === '' && !($this->position === $this->unencryptedSize && ($this->position % $this->unencryptedBlockSize) === 0)) {
// Get the data from the file handle
$data = $this->stream_read_block($this->util->getBlockSize());
- $position = (int)floor($this->position/$this->unencryptedBlockSize);
+ $position = (int)floor($this->position / $this->unencryptedBlockSize);
$numberOfChunks = (int)($this->unencryptedSize / $this->unencryptedBlockSize);
if ($numberOfChunks === $position) {
$position .= 'end';