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 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2020 (original work) Open Assessment Technologies SA ; |
19 | */ |
20 | |
21 | declare(strict_types=1); |
22 | |
23 | namespace oat\taoTests\models\runner\time; |
24 | |
25 | /** |
26 | * Interface TimerAdjustmentMapInterface |
27 | * |
28 | * Describes an API for timer adjustment storage and access. |
29 | * |
30 | * @package oat\taoTests\models\classes\runner\time |
31 | */ |
32 | interface TimerAdjustmentMapInterface |
33 | { |
34 | /** |
35 | * Puts an increase to the map |
36 | * @param string $sourceId |
37 | * @param string $type |
38 | * @param int $seconds |
39 | * @return TimerAdjustmentMapInterface |
40 | */ |
41 | public function increase(string $sourceId, string $type, int $seconds): TimerAdjustmentMapInterface; |
42 | |
43 | /** |
44 | * Puts an decrease to the map |
45 | * @param string $sourceId |
46 | * @param string $type |
47 | * @param int $seconds |
48 | * @return TimerAdjustmentMapInterface |
49 | */ |
50 | public function decrease(string $sourceId, string $type, int $seconds): TimerAdjustmentMapInterface; |
51 | |
52 | /** |
53 | * Gets the calculated total adjustments of all types stored for provided source ID in seconds. |
54 | * @param string $sourceId |
55 | * @return int |
56 | */ |
57 | public function get(string $sourceId): int; |
58 | |
59 | /** |
60 | * Gets the calculated adjustments for provided source ID and adjustment type in seconds. |
61 | * |
62 | * @param string $sourceId |
63 | * @param string $type |
64 | * @return int |
65 | */ |
66 | public function getByType(string $sourceId, string $type): int; |
67 | } |