Type for Closure argument

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-20 19:34:52 +01:00
parent 662840bc25
commit 77bec5898f
2 changed files with 8 additions and 8 deletions

View file

@ -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);