Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| AEnvironmentAwareController | |
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| setAPIVersion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getAPIVersion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | /** |
| 5 | * SPDX-FileCopyrightText: 2020-2024 LibreCode coop and contributors |
| 6 | * SPDX-License-Identifier: AGPL-3.0-or-later |
| 7 | */ |
| 8 | |
| 9 | namespace OCA\Libresign\Controller; |
| 10 | |
| 11 | use OCP\AppFramework\OCSController; |
| 12 | |
| 13 | abstract class AEnvironmentAwareController extends OCSController { |
| 14 | protected int $apiVersion = 1; |
| 15 | |
| 16 | public function setAPIVersion(int $apiVersion): void { |
| 17 | $this->apiVersion = $apiVersion; |
| 18 | } |
| 19 | |
| 20 | public function getAPIVersion(): int { |
| 21 | return $this->apiVersion; |
| 22 | } |
| 23 | } |