• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LibreSign / libresign / 21498844095

29 Jan 2026 11:44PM UTC coverage: 46.59%. First build
21498844095

Pull #6641

github

web-flow
Merge e7322a308 into f39fc2360
Pull Request #6641: refactor: centralize file status management

66 of 89 new or added lines in 12 files covered. (74.16%)

7897 of 16950 relevant lines covered (46.59%)

5.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.29
/lib/Service/SignRequest/StatusCacheService.php
1
<?php
2

3
declare(strict_types=1);
4
/**
5
 * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
6
 * SPDX-License-Identifier: AGPL-3.0-or-later
7
 */
8

9
namespace OCA\Libresign\Service\SignRequest;
10

11
use OCP\ICache;
12
use OCP\ICacheFactory;
13

14
class StatusCacheService {
15
        public const STATUS_KEY_PREFIX = 'libresign_status_';
16
        public const DEFAULT_TTL = 300;
17

18
        private ICache $cache;
19

20
        public function __construct(
21
                ICacheFactory $cacheFactory,
22
        ) {
23
                $this->cache = $cacheFactory->createDistributed('libresign_progress');
47✔
24
        }
25

26
        public function setStatus(string $fileUuid, int $status): void {
27

28
                if ($fileUuid === '') {
×
29
                        return;
×
30
                }
NEW
31
                $this->cache->set(self::STATUS_KEY_PREFIX . $fileUuid, $status, self::DEFAULT_TTL);
×
32
        }
33

34
        public function getStatus(string $fileUuid): mixed {
35
                if ($fileUuid === '') {
×
36
                        return false;
×
37
                }
38
                return $this->cache->get(self::STATUS_KEY_PREFIX . $fileUuid);
×
39
        }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc