Skip to content

Commit

Permalink
Fix labeled version expiry
Browse files Browse the repository at this point in the history
Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: XueSheng-GIT <Michael.Frase@gmx.de>
  • Loading branch information
2 people authored and backportbot[bot] committed Nov 13, 2024
1 parent d4dec4a commit f7ef94b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Versions/ExpireManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ protected function getAutoExpireList(int $time, array $versions): array {
while ($newInterval) {
if ($nextInterval === -1 || $prevTimestamp > $nextInterval) {
if ($version->getTimestamp() > $nextVersion) {

Check failure on line 90 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:90:10: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 90 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedDocblockClass

lib/Versions/ExpireManager.php:90:10: UndefinedDocblockClass: Docblock-defined class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/200)
//distance between two version too small, mark to delete
$toDelete[] = $version;
// Do not expire versions with a label.
if (!($version instanceof IMetadataVersion) || $version->getMetadataValue('label') === null || $version->getMetadataValue('label') === '') {

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:33: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:54: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedInterfaceMethod

lib/Versions/ExpireManager.php:92:64: UndefinedInterfaceMethod: Method (OCA\Files_Versions\Versions\IVersion&OCA\GroupFolders\Versions\IMetadataVersion)::getMetadataValue does not exist (see https://psalm.dev/181)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:92:102: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)

Check failure on line 92 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedInterfaceMethod

lib/Versions/ExpireManager.php:92:112: UndefinedInterfaceMethod: Method (OCA\Files_Versions\Versions\IVersion&OCA\GroupFolders\Versions\IMetadataVersion)::getMetadataValue does not exist (see https://psalm.dev/181)
//distance between two version too small, mark to delete
$toDelete[] = $version;
}
} else {
$nextVersion = $version->getTimestamp() - $step;

Check failure on line 97 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:97:22: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)
$prevTimestamp = $version->getTimestamp();

Check failure on line 98 in lib/Versions/ExpireManager.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

UndefinedClass

lib/Versions/ExpireManager.php:98:24: UndefinedClass: Class, interface or enum named OCA\GroupFolders\Versions\IMetadataVersion does not exist (see https://psalm.dev/019)
Expand Down

0 comments on commit f7ef94b

Please sign in to comment.