aboutsummaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/lib/Command/Check.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification/lib/Command/Check.php')
-rw-r--r--apps/updatenotification/lib/Command/Check.php28
1 files changed, 7 insertions, 21 deletions
diff --git a/apps/updatenotification/lib/Command/Check.php b/apps/updatenotification/lib/Command/Check.php
index 75e42904515..d93e4935012 100644
--- a/apps/updatenotification/lib/Command/Check.php
+++ b/apps/updatenotification/lib/Command/Check.php
@@ -17,26 +17,12 @@ use Symfony\Component\Console\Output\OutputInterface;
class Check extends Command {
- /**
- * @var Installer $installer
- */
- private $installer;
-
- /**
- * @var AppManager $appManager
- */
- private $appManager;
-
- /**
- * @var UpdateChecker $updateChecker
- */
- private $updateChecker;
-
- public function __construct(AppManager $appManager, UpdateChecker $updateChecker, Installer $installer) {
+ public function __construct(
+ private AppManager $appManager,
+ private UpdateChecker $updateChecker,
+ private Installer $installer,
+ ) {
parent::__construct();
- $this->installer = $installer;
- $this->appManager = $appManager;
- $this->updateChecker = $updateChecker;
}
protected function configure(): void {
@@ -52,13 +38,13 @@ class Check extends Command {
// Server
$r = $this->updateChecker->getUpdateState();
if (isset($r['updateAvailable']) && $r['updateAvailable']) {
- $output->writeln($r['updateVersionString'] . ' is available. Get more information on how to update at '. $r['updateLink'] . '.');
+ $output->writeln($r['updateVersionString'] . ' is available. Get more information on how to update at ' . $r['updateLink'] . '.');
$updatesAvailableCount += 1;
}
// Apps
- $apps = $this->appManager->getInstalledApps();
+ $apps = $this->appManager->getEnabledApps();
foreach ($apps as $app) {
$update = $this->installer->isUpdateAvailable($app);
if ($update !== false) {