mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 16:50:55 -04:00
Merge pull request #56491 from nextcloud/carl/type-version
refactor(ServerVersion): Add missing type hinting
This commit is contained in:
commit
6bb46fde3e
2 changed files with 7 additions and 3 deletions
2
.github/workflows/lint-php-cs.yml
vendored
2
.github/workflows/lint-php-cs.yml
vendored
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
- name: Set up php8.1
|
||||
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
|
||||
with:
|
||||
php-version: 8.1
|
||||
php-version: 8.2
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
|
||||
coverage: none
|
||||
ini-file: development
|
||||
|
|
|
|||
|
|
@ -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