aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Migration/SimpleOutput.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Migration/SimpleOutput.php')
-rw-r--r--lib/private/Migration/SimpleOutput.php49
1 files changed, 17 insertions, 32 deletions
diff --git a/lib/private/Migration/SimpleOutput.php b/lib/private/Migration/SimpleOutput.php
index 11f2ed2837c..b7a07cc6ff2 100644
--- a/lib/private/Migration/SimpleOutput.php
+++ b/lib/private/Migration/SimpleOutput.php
@@ -1,29 +1,14 @@
<?php
+
/**
- * @copyright Copyright (c) 2017, ownCloud GmbH
- *
- * @author Joas Schilling <coding@schilljs.com>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2015 ownCloud GmbH
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
-
namespace OC\Migration;
-use OCP\ILogger;
use OCP\Migration\IOutput;
+use Psr\Log\LoggerInterface;
/**
* Class SimpleOutput
@@ -34,21 +19,21 @@ use OCP\Migration\IOutput;
* @package OC\Migration
*/
class SimpleOutput implements IOutput {
+ public function __construct(
+ private LoggerInterface $logger,
+ private $appName,
+ ) {
+ }
- /** @var ILogger */
- private $logger;
- private $appName;
-
- public function __construct(ILogger $logger, $appName) {
- $this->logger = $logger;
- $this->appName = $appName;
+ public function debug(string $message): void {
+ $this->logger->debug($message, ['app' => $this->appName]);
}
/**
* @param string $message
* @since 9.1.0
*/
- public function info($message) {
+ public function info($message): void {
$this->logger->info($message, ['app' => $this->appName]);
}
@@ -56,7 +41,7 @@ class SimpleOutput implements IOutput {
* @param string $message
* @since 9.1.0
*/
- public function warning($message) {
+ public function warning($message): void {
$this->logger->warning($message, ['app' => $this->appName]);
}
@@ -64,7 +49,7 @@ class SimpleOutput implements IOutput {
* @param int $max
* @since 9.1.0
*/
- public function startProgress($max = 0) {
+ public function startProgress($max = 0): void {
}
/**
@@ -72,12 +57,12 @@ class SimpleOutput implements IOutput {
* @param string $description
* @since 9.1.0
*/
- public function advance($step = 1, $description = '') {
+ public function advance($step = 1, $description = ''): void {
}
/**
* @since 9.1.0
*/
- public function finishProgress() {
+ public function finishProgress(): void {
}
}