mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-02 21:39:35 +00:00
Fixed phpstan issues
This commit is contained in:
parent
a755287c3b
commit
cad5261aba
6 changed files with 11 additions and 10 deletions
|
|
@ -145,15 +145,12 @@ class UpdateChecker
|
|||
/**
|
||||
* Get all available releases from GitHub (cached).
|
||||
*
|
||||
* @return array<array{version: string, tag: string, name: string, url: string, published_at: string, body: string, prerelease: bool, assets: array}>
|
||||
* @return array<array{version: string, tag: string, name: string, url: string, published_at: string, body: string, prerelease: bool, draft:bool, assets: array, tarball_url: ?string, zipball_url: ?string}>
|
||||
*/
|
||||
public function getAvailableReleases(int $limit = 10): array
|
||||
{
|
||||
if (!$this->privacySettings->checkForUpdates) {
|
||||
return [ //If we don't want to check for updates, we can return dummy data
|
||||
'version' => '0.0.1',
|
||||
'url' => 'update-checking-disabled'
|
||||
];
|
||||
return [];
|
||||
}
|
||||
|
||||
return $this->updateCache->get(self::CACHE_KEY_RELEASES, function (ItemInterface $item) use ($limit) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue