mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
chore(files_versions): Be extra-cautious to please psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
84ba78fe6d
commit
3659b13cd2
1 changed files with 4 additions and 0 deletions
|
|
@ -793,6 +793,10 @@ class Storage {
|
|||
$newInterval = false; // version checked so we can move to the next one
|
||||
} else { // time to move on to the next interval
|
||||
$interval++;
|
||||
if ($interval > count(Storage::MAX_VERSIONS_PER_INTERVAL)) {
|
||||
/* Should never happen, as last interval has -1 as nextInterval */
|
||||
throw new \Exception('MAX_VERSIONS_PER_INTERVAL is malformed or there is a logic issue');
|
||||
}
|
||||
$step = Storage::MAX_VERSIONS_PER_INTERVAL[$interval]['step'];
|
||||
$nextVersion = $prevTimestamp - $step;
|
||||
if (Storage::MAX_VERSIONS_PER_INTERVAL[$interval]['intervalEndsAfter'] === -1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue