diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php b/src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php index c0f905ac5..449827049 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Routing/Api/SettingsController.php @@ -57,7 +57,7 @@ class SettingsController extends ApiMutableModelControllerBase $ifconfig = json_decode((new Backend())->configdRun('interface list ifconfig'), true); $gateways_status = json_decode((new Backend())->configdRun('interface gateways status'), true); $gateways = array_values($this->getModel()->gatewaysIndexedByName(true, false, true)); - $down_gateways = !empty((string)$cfg->system->gw_switch_default) ? array_map(function ($gw){ + $down_gateways = !empty((string)$cfg->system->gw_switch_default) ? array_map(function ($gw) { if (str_contains($gw['status'], 'down')) { return $gw['name']; } @@ -204,8 +204,11 @@ class SettingsController extends ApiMutableModelControllerBase } if (!empty($groups)) { - throw new UserException(sprintf(gettext("Gateway %s cannot be deleted because it is in use on Gateway Group(s) '%s'"), - $gateway->name, implode(', ', $groups))); + throw new UserException(sprintf( + gettext("Gateway %s cannot be deleted because it is in use on Gateway Group(s) '%s'"), + $gateway->name, + implode(', ', $groups) + )); } $routes = []; @@ -218,8 +221,11 @@ class SettingsController extends ApiMutableModelControllerBase } if (!empty($routes)) { - throw new UserException(sprintf(gettext("Gateway %s cannot be deleted because it is in use on Static Route(s) '%s'"), - $gateway->name, implode(', ', $routes))); + throw new UserException(sprintf( + gettext("Gateway %s cannot be deleted because it is in use on Static Route(s) '%s'"), + $gateway->name, + implode(', ', $routes) + )); } $result = $this->delBase('gateway_item', $uuid); diff --git a/src/opnsense/scripts/shell/setaddr.php b/src/opnsense/scripts/shell/setaddr.php index 45fc073b3..93903cf8b 100755 --- a/src/opnsense/scripts/shell/setaddr.php +++ b/src/opnsense/scripts/shell/setaddr.php @@ -288,7 +288,7 @@ function add_gateway_to_config($interface, $gatewayip, $inet_type, $is_in_subnet $gw->createOrUpdateGateway($item, $uuid); - /* + /* * Serialize back to global config, capturing the changes made here. * write_config() will take care of writing the global config to disk later on */