diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 510c373b..26dc22a3 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -123,7 +123,7 @@ readonly class DockerController { } public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { - $this->configurationManager->setMultiple(function ($confManager) use ($request) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) use ($request) { $confManager->backupMode = 'restore'; $confManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; $confManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); @@ -152,7 +152,7 @@ readonly class DockerController { } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { - $this->configurationManager->setMultiple(function ($confManager) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) { $confManager->backupMode = 'test'; $confManager->instance_restore_attempt = false; }); @@ -177,7 +177,7 @@ readonly class DockerController { $port = 443; } - $this->configurationManager->setMultiple(function ($confManager) use ($request, $host, $port, $path) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) use ($request, $host, $port, $path) { $confManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']); // set AIO_URL $confManager->AIO_URL = $host . ':' . (string)$port . $path; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 19ff0b74..2fb0a413 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -419,7 +419,7 @@ class ConfigurationManager } } - $this->setMultiple(function ($confManager) use ($domain) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($domain) { // Write domain // Don't set the domain via the attribute, or we create a loop. $confManager->set('domain', $domain); @@ -441,7 +441,7 @@ class ConfigurationManager */ public function SetBorgLocationVars(string $location, string $repo) : void { $this->ValidateBorgLocationVars($location, $repo); - $this->setMultiple(function ($confManager) use ($location, $repo) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($location, $repo) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; }); @@ -490,7 +490,7 @@ class ConfigurationManager public function DeleteBorgBackupLocationItems() : void { // Delete the variables - $this->setMultiple(function ($confManager) { + $this->setMultiple(function (ConfigurationManager $confManager) { $confManager->borg_backup_host_location = ''; $confManager->borg_remote_repo = ''; }); @@ -513,7 +513,7 @@ class ConfigurationManager throw new InvalidSettingConfigurationException("Please enter the password!"); } - $this->setMultiple(function ($confManager) use ($location, $repo, $password) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($location, $repo, $password) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; $confManager->borg_restore_password = $password; @@ -976,7 +976,7 @@ class ConfigurationManager if ($input === []) { return; } - $this->setMultiple(function($confManager) use ($input) { + $this->setMultiple(function(ConfigurationManager $confManager) use ($input) { foreach ($input as $variable) { $keyWithValue = $confManager->replaceEnvPlaceholders($variable); [$key, $value] = explode('=', $keyWithValue, 2);