Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4/**
5 * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
6 * SPDX-License-Identifier: AGPL-3.0-or-later
7 */
8
9namespace OCA\Libresign\Service\UsageStatistics\Contract;
10
11use OCA\Libresign\Service\UsageStatistics\Model\MetricValue;
12use OCA\Libresign\Service\UsageStatistics\Model\ReportMode;
13use OCA\Libresign\Service\UsageStatistics\Model\ReportPeriod;
14
15interface IMetricCollector {
16    /**
17     * Schema metrics this collector is the only source of, as "category.key".
18     *
19     * @return list<string>
20     */
21    public function metricIds(): array;
22
23    /**
24     * Must answer every id from metricIds(), using MetricValue::unavailable()
25     * when the value cannot be known for the period.
26     *
27     * @return array<string, MetricValue>
28     */
29    public function collect(ReportPeriod $period, ReportMode $mode): array;
30}