summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-06-21 16:03:45 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-06-21 16:17:52 +0200
commit1bd5222224bac9b8f1037c992367c9af85a9ec5a (patch)
tree2a36b991633734a0738a415c266bcdfeb290c58a /lib/private/DB
parentdbc2c2325ea194b4588515e5fad988b7ab9bcf3f (diff)
downloadnextcloud-server-1bd5222224bac9b8f1037c992367c9af85a9ec5a.tar.gz
nextcloud-server-1bd5222224bac9b8f1037c992367c9af85a9ec5a.zip
Fix PHP 8.2 warnings about undeclared properties
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/MigrationService.php34
1 files changed, 13 insertions, 21 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php
index 13bbe8dc5d0..22fffa596ec 100644
--- a/lib/private/DB/MigrationService.php
+++ b/lib/private/DB/MigrationService.php
@@ -46,34 +46,25 @@ use Psr\Log\LoggerInterface;
class MigrationService {
- /** @var boolean */
- private $migrationTableCreated;
- /** @var array */
- private $migrations;
- /** @var IOutput */
- private $output;
- /** @var Connection */
- private $connection;
- /** @var string */
- private $appName;
- /** @var bool */
- private $checkOracle;
+ private bool $migrationTableCreated;
+ private array $migrations;
+ private string $migrationsPath;
+ private string $migrationsNamespace;
+ private IOutput $output;
+ private Connection $connection;
+ private string $appName;
+ private bool $checkOracle;
/**
- * MigrationService constructor.
- *
- * @param $appName
- * @param Connection $connection
- * @param AppLocator $appLocator
- * @param IOutput|null $output
* @throws \Exception
*/
- public function __construct($appName, Connection $connection, IOutput $output = null, AppLocator $appLocator = null) {
+ public function __construct($appName, Connection $connection, ?IOutput $output = null, ?AppLocator $appLocator = null) {
$this->appName = $appName;
$this->connection = $connection;
- $this->output = $output;
- if (null === $this->output) {
+ if ($output === null) {
$this->output = new SimpleOutput(\OC::$server->get(LoggerInterface::class), $appName);
+ } else {
+ $this->output = $output;
}
if ($appName === 'core') {
@@ -104,6 +95,7 @@ class MigrationService {
}
}
}
+ $this->migrationTableCreated = false;
}
/**