src: style sweep

This commit is contained in:
Franco Fichtner 2024-10-29 20:34:37 +01:00
parent fed2a35269
commit 33fcdabdbb
2 changed files with 5 additions and 3 deletions

View File

@ -267,7 +267,7 @@ function filter_core_rules_system($fw, $defaults)
}
// CARP defaults
if ((new OPNsense\Interfaces\Vip())->isCarpEnabled()) {
foreach ($ipv6_disabled ? ['224.0.0.18'] : ['ff02::12', '224.0.0.18'] as $to) {
foreach ($ipv6_disabled ? ['224.0.0.18'] : ['ff02::12', '224.0.0.18'] as $to) {
$fw->registerFilterRule(
1,
['protocol' => 'carp', 'direction' => 'any', 'to' => $to, 'descr' => 'CARP defaults'],

View File

@ -40,14 +40,16 @@ class General extends BaseModel
{
$messages = parent::performValidation($validateFullModel);
$enable_config_constraints = false;
foreach ([
foreach (
[
'CipherString',
'Ciphersuites',
'groups',
'MinProtocol',
'MinProtocol_DTLS',
'SignatureAlgorithms'
] as $fieldname) {
] as $fieldname
) {
if (!empty((string)$this->$fieldname)) {
$enable_config_constraints = true;
}