mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-07 14:27:58 +00:00
Add missing type definitions for psalm
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
9c0334d3f0
commit
87e005be4b
9 changed files with 97 additions and 21 deletions
|
|
@ -18,6 +18,7 @@ readonly class GitHubContainerRegistryManager
|
|||
{
|
||||
$cacheKey = 'ghcr-manifest-' . $name . $tag;
|
||||
|
||||
/** @psalm-var mixed $cachedVersion */
|
||||
$cachedVersion = apcu_fetch($cacheKey);
|
||||
if ($cachedVersion !== false && is_string($cachedVersion)) {
|
||||
return $cachedVersion;
|
||||
|
|
@ -31,9 +32,10 @@ readonly class GitHubContainerRegistryManager
|
|||
'https://ghcr.io/token?scope=repository:' . $name . ':pull'
|
||||
);
|
||||
$body = $authTokenRequest->getBody()->getContents();
|
||||
/** @var array */
|
||||
$decodedBody = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
|
||||
if (isset($decodedBody['token'])) {
|
||||
$authToken = $decodedBody['token'];
|
||||
$authToken = (string) $decodedBody['token'];
|
||||
$manifestRequest = $this->guzzleClient->request(
|
||||
'HEAD',
|
||||
'https://ghcr.io/v2/' . $name . '/manifests/' . $tag,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue