diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-05 15:12:57 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-10-05 20:25:24 +0200 |
commit | d9015a8c94bfd71fe484618a06d276701d3bf9ff (patch) | |
tree | 3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/files_versions/lib/Storage.php | |
parent | d357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff) | |
download | nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip |
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_versions/lib/Storage.php')
-rw-r--r-- | apps/files_versions/lib/Storage.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index a83ec348827..3f4ccf7f0a2 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -58,8 +58,8 @@ use OCP\Lock\ILockingProvider; use OCP\User; class Storage { - public const DEFAULTENABLED=true; - public const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota + public const DEFAULTENABLED = true; + public const DEFAULTMAXSIZE = 50; // unit: percentage; 50% of available disk space/quota public const VERSIONS_ROOT = 'files_versions/'; public const DELETE_TRIGGER_MASTER_REMOVED = 0; @@ -351,7 +351,7 @@ class Storage { $versionCreated = true; } - $fileToRestore = 'files_versions' . $filename . '.v' . $revision; + $fileToRestore = 'files_versions' . $filename . '.v' . $revision; // Restore encrypted version of the old file for the newly restored file // This has to happen manually here since the file is manually copied below @@ -502,7 +502,7 @@ class Storage { $toDelete = []; foreach (array_reverse($versions['all']) as $key => $version) { - if ((int)$version['version'] <$threshold) { + if ((int)$version['version'] < $threshold) { $toDelete[$key] = $version; } else { //Versions are sorted by time - nothing mo to iterate. @@ -799,7 +799,7 @@ class Storage { // Check if enough space is available after versions are rearranged. // If not we delete the oldest versions until we meet the size limit for versions, // but always keep the two latest versions - $numOfVersions = count($allVersions) -2 ; + $numOfVersions = count($allVersions) - 2 ; $i = 0; // sort oldest first and make sure that we start at the first element ksort($allVersions); |