summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-22 15:22:50 +0200
committerJoas Schilling <coding@schilljs.com>2021-04-27 14:34:32 +0200
commit167efa19d706b1e430343554cdecd513cbb6610e (patch)
tree8f4afd2fd685a8434281046f7aa89713f7b8d798 /core
parentdf47445c014b83d8400bada6dad53d26d24fd803 (diff)
downloadnextcloud-server-167efa19d706b1e430343554cdecd513cbb6610e.tar.gz
nextcloud-server-167efa19d706b1e430343554cdecd513cbb6610e.zip
Fix psalm errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r--core/Command/Upgrade.php14
-rw-r--r--core/ajax/update.php2
-rw-r--r--core/register_command.php2
3 files changed, 8 insertions, 10 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php
index 9dc1c4642b5..7ad3360c1bc 100644
--- a/core/Command/Upgrade.php
+++ b/core/Command/Upgrade.php
@@ -37,8 +37,8 @@ use OC\Console\TimestampFormatter;
use OC\Installer;
use OC\Updater;
use OCP\IConfig;
-use OCP\ILogger;
use OCP\Util;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
@@ -56,15 +56,13 @@ class Upgrade extends Command {
/** @var IConfig */
private $config;
- /** @var ILogger */
+ /** @var LoggerInterface */
private $logger;
- /**
- * @param IConfig $config
- * @param ILogger $logger
- * @param Installer $installer
- */
- public function __construct(IConfig $config, ILogger $logger, Installer $installer) {
+ /** @var Installer */
+ private $installer;
+
+ public function __construct(IConfig $config, LoggerInterface $logger, Installer $installer) {
parent::__construct();
$this->config = $config;
$this->logger = $logger;
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 6e655f42841..390ad0c2c47 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -117,7 +117,7 @@ if (\OCP\Util::needUpgrade()) {
// avoid side effects
\OC_User::setIncognitoMode(true);
- $logger = \OC::$server->getLogger();
+ $logger = \OC::$server->get(\Psr\Log\LoggerInterface::class);
$config = \OC::$server->getConfig();
$updater = new \OC\Updater(
$config,
diff --git a/core/register_command.php b/core/register_command.php
index 2a68cbcbe87..8741d8d1abe 100644
--- a/core/register_command.php
+++ b/core/register_command.php
@@ -160,7 +160,7 @@ if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
- $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class)));
+ $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->query(\OC\Installer::class)));
$application->add(new OC\Core\Command\Maintenance\Repair(
new \OC\Repair([], \OC::$server->getEventDispatcher(), \OC::$server->get(LoggerInterface::class)),
\OC::$server->getConfig(),