mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
refactor(ServerVersion): Add missing type hinting
And mark the class as consumable and readonly. Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This commit is contained in:
parent
76d878e7b9
commit
d4356e6491
1 changed files with 6 additions and 2 deletions
|
|
@ -9,11 +9,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCP;
|
||||
|
||||
use OCP\AppFramework\Attribute\Consumable;
|
||||
|
||||
/**
|
||||
* @since 31.0.0
|
||||
*/
|
||||
class ServerVersion {
|
||||
#[Consumable(since: '31.0.0')]
|
||||
readonly class ServerVersion {
|
||||
|
||||
/** @var int[] */
|
||||
private array $version;
|
||||
private string $versionString;
|
||||
private string $build;
|
||||
|
|
@ -59,6 +63,7 @@ class ServerVersion {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return int[]
|
||||
* @since 31.0.0
|
||||
*/
|
||||
public function getVersion(): array {
|
||||
|
|
@ -103,6 +108,5 @@ class ServerVersion {
|
|||
$version .= ' Build:' . $build;
|
||||
}
|
||||
return $version;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue