summaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppStore
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-04-05 12:50:08 +0200
commit426c0341ffff262f58d1b7f031de4f0c53c8bec5 (patch)
treeac61718627051e469d256685cbe1001b2448d926 /lib/private/App/AppStore
parent5063b76c8ac41199c0a0cc088224d4ab0c1ae9b3 (diff)
downloadnextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.tar.gz
nextcloud-server-426c0341ffff262f58d1b7f031de4f0c53c8bec5.zip
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/App/AppStore')
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index 0eb089bbdc2..095b026cb44 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -62,10 +62,10 @@ abstract class Fetcher {
protected $fileName;
/** @var string */
protected $endpointName;
- /** @var string */
- protected $version;
- /** @var string */
- protected $channel;
+ /** @var ?string */
+ protected $version = null;
+ /** @var ?string */
+ protected $channel = null;
public function __construct(Factory $appDataFactory,
IClientService $clientService,
@@ -149,7 +149,7 @@ abstract class Fetcher {
*/
public function get($allowUnstable = false) {
$appstoreenabled = $this->config->getSystemValueBool('appstoreenabled', true);
- $internetavailable = $this->config->getSystemValue('has_internet_connection', true);
+ $internetavailable = $this->config->getSystemValueBool('has_internet_connection', true);
if (!$appstoreenabled || !$internetavailable) {
return [];
@@ -218,7 +218,7 @@ abstract class Fetcher {
*/
protected function getVersion() {
if ($this->version === null) {
- $this->version = $this->config->getSystemValue('version', '0.0.0');
+ $this->version = $this->config->getSystemValueString('version', '0.0.0');
}
return $this->version;
}
@@ -251,6 +251,6 @@ abstract class Fetcher {
}
protected function getEndpoint(): string {
- return $this->config->getSystemValue('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName;
+ return $this->config->getSystemValueString('appstoreurl', 'https://apps.nextcloud.com/api/v1') . '/' . $this->endpointName;
}
}