Skip to content

Commit d4356e6

Browse files
committed
refactor(ServerVersion): Add missing type hinting
And mark the class as consumable and readonly. Signed-off-by: Carl Schwan <[email protected]>
1 parent 76d878e commit d4356e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/public/ServerVersion.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@
99

1010
namespace OCP;
1111

12+
use OCP\AppFramework\Attribute\Consumable;
13+
1214
/**
1315
* @since 31.0.0
1416
*/
15-
class ServerVersion {
17+
#[Consumable(since: '31.0.0')]
18+
readonly class ServerVersion {
1619

20+
/** @var int[] */
1721
private array $version;
1822
private string $versionString;
1923
private string $build;
@@ -59,6 +63,7 @@ public function getPatchVersion(): int {
5963
}
6064

6165
/**
66+
* @return int[]
6267
* @since 31.0.0
6368
*/
6469
public function getVersion(): array {
@@ -103,6 +108,5 @@ public function getHumanVersion(): string {
103108
$version .= ' Build:' . $build;
104109
}
105110
return $version;
106-
107111
}
108112
}

0 commit comments

Comments
 (0)