From d1d8b6802d05f665e0c86aa2c0bba21c4d8852d9 Mon Sep 17 00:00:00 2001 From: Baptiste Fotia Date: Tue, 26 Mar 2024 16:35:27 +0100 Subject: [PATCH] style(php): Run composer run cs:fix Signed-off-by: Baptiste Fotia --- .../ReRunChangeGroupnamesForPgSql.php | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/lib/Migration/ReRunChangeGroupnamesForPgSql.php b/lib/Migration/ReRunChangeGroupnamesForPgSql.php index 027e78fec..60b5faa51 100644 --- a/lib/Migration/ReRunChangeGroupnamesForPgSql.php +++ b/lib/Migration/ReRunChangeGroupnamesForPgSql.php @@ -2,44 +2,38 @@ namespace OCA\Workspace\Migration; -use OCP\IConfig; -use OCP\Migration\IOutput; -use OCP\Migration\IRepairStep; use OCA\Workspace\Upgrade\Upgrade; use OCA\Workspace\Upgrade\UpgradeV300; use OCP\AppFramework\Services\IAppConfig; +use OCP\IConfig; +use OCP\Migration\IOutput; +use OCP\Migration\IRepairStep; + +class ReRunChangeGroupnamesForPgSql implements IRepairStep { + public function __construct( + private IConfig $config, + private IAppConfig $appConfig, + private UpgradeV300 $upgrade, + ) { + } + + public function getName(): string { + return 'Rerun the change groupnames repair step for a Nextcloud instance using PostgreSQL.'; + } + + public function run(IOutput $output): void { + $sgbdName = $this->config->getSystemValue('dbtype'); + + if ($sgbdName !== 'pgsql') { + return; + } + + $statusMigration = boolval($this->appConfig->getAppValue(Upgrade::CONTROL_MIGRATION_V3, '1')); + + if ($statusMigration === true) { + return; + } -class ReRunChangeGroupnamesForPgSql implements IRepairStep -{ - public function __construct( - private IConfig $config, - private IAppConfig $appConfig, - private UpgradeV300 $upgrade, - ) - { - } - - public function getName(): string - { - return 'Rerun the change groupnames repair step for a Nextcloud instance using PostgreSQL.'; - } - - public function run(IOutput $output): void - { - $sgbdName = $this->config->getSystemValue('dbtype'); - - if ($sgbdName !== 'pgsql') - { - return; - } - - $statusMigration = boolval($this->appConfig->getAppValue(Upgrade::CONTROL_MIGRATION_V3, '1')); - - if ($statusMigration === true) - { - return; - } - - $this->upgrade->upgrade(); - } + $this->upgrade->upgrade(); + } }