mvc: style sweep

This commit is contained in:
Franco Fichtner 2025-03-04 20:34:48 +01:00
parent 719aed032e
commit 8c0ef7c3ac
2 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,8 @@ class Dnsmasq extends BaseModel
}
}
if ($range->constructor->isEmpty() &&
if (
$range->constructor->isEmpty() &&
(str_starts_with($range->start_addr, '::') || str_starts_with($range->end_addr, '::'))
) {
$messages->appendMessage(

View File

@ -36,7 +36,7 @@ class RangeAddressField extends NetworkField
{
if (str_starts_with($input, '::')) {
/* special case, if we prefix a partial range with a network, we should end up with a valid address */
return filter_var('2000'.$input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
return filter_var('2000' . $input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
} else {
return parent::isValidInput($input);
}