diff --git a/src/etc/inc/plugins.inc.d/ipsec.inc b/src/etc/inc/plugins.inc.d/ipsec.inc index 4ad83d810..75f66f540 100644 --- a/src/etc/inc/plugins.inc.d/ipsec.inc +++ b/src/etc/inc/plugins.inc.d/ipsec.inc @@ -1472,11 +1472,11 @@ EOD; for ($idx = 0; $idx < count($leftsubnet_spec); ++$idx) { if (count($leftsubnet_spec) == 1) { $tmpconf = str_replace('<>', "{$ph1ent['ikeid']}", $connEntry); - $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 ); + $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000); } else { // suffix connection with sequence number $tmpconf = str_replace('<>', sprintf('%s-%03d', $ph1ent['ikeid'], $idx), $connEntry); - $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 + $idx ); + $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 + $idx); } $tmpconf .= "\trightsubnet = " . $rightsubnet_spec[$idx]. "\n"; $tmpconf .= "\tleftsubnet = " . $leftsubnet_spec[$idx] . "\n"; @@ -1500,7 +1500,7 @@ EOD; // name from the first configured tunnel ($idx == 0): $conn_suffix = $idx ? sprintf('-%03d', $idx) : ''; $tmpconf[] = "conn con{$ph1ent['ikeid']}{$conn_suffix}"; - $tmpconf[] = sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 + $idx ); + $tmpconf[] = sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 + $idx); if (!empty($rightsubnet_spec[$idx])) { $tmpconf[] = "\trightsubnet = {$rightsubnet_spec[$idx]}"; } @@ -1519,7 +1519,7 @@ EOD; } } else { $tmpconf = str_replace('<>', "{$ph1ent['ikeid']}", $connEntry); - $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000 ); + $tmpconf .= sprintf("\treqid = %d\n", (int)$ph1ent['ikeid'] * 1000); if (!empty($rightsubnet_spec)) { $tmpconf .= "\trightsubnet = " . join(',', array_unique($rightsubnet_spec)) . "\n"; } @@ -1682,12 +1682,15 @@ function ipsec_configure_vti() } } if (!$isfound) { - log_error(sprintf( - "remove tunnel %s %s from interface %s", $addr['ipaddr'], $addr['endpoint'], $intf - )); - mwexecf('/sbin/ifconfig %s %s %s delete', array( + log_error(sprintf( + "remove tunnel %s %s from interface %s", + $addr['ipaddr'], + $addr['endpoint'], + $intf + )); + mwexecf('/sbin/ifconfig %s %s %s delete', array( $intf, $proto == 'ipv6' ? 'inet6' : 'inet', $addr['ipaddr'], $addr['endpoint'] - )); + )); } } } @@ -1701,8 +1704,9 @@ function ipsec_configure_vti() $inet = is_ipaddrv6($intf_details['local']) ? 'inet6' : 'inet'; if (empty($current_interfaces[$intf])) { if (mwexecf('/sbin/ifconfig %s create reqid %s', array($intf, $intf_details['reqid'])) == 0) { - mwexecf('/sbin/ifconfig %s %s tunnel %s %s up', - array($intf, $inet, $intf_details['local'], $intf_details['remote']) + mwexecf( + '/sbin/ifconfig %s %s tunnel %s %s up', + array($intf, $inet, $intf_details['local'], $intf_details['remote']) ); } } diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php b/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php index d7888e03b..5a43f5d41 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php @@ -187,7 +187,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase } else { // XXX remove user-config-readonly in some future release throw new UserException( - sprintf("User %s denied for write access (user-config-readonly set)", $this->getUserName()) + sprintf("User %s denied for write access (user-config-readonly set)", $this->getUserName()) ); } } @@ -288,7 +288,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails */ - public function addBase($post_field, $path, $overlay=null) + public function addBase($post_field, $path, $overlay = null) { $result = array("result" => "failed"); if ($this->request->isPost() && $this->request->hasPost($post_field)) { @@ -359,7 +359,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase * @throws \Phalcon\Validation\Exception on validation issues * @throws \ReflectionException when binding to the model class fails */ - public function setBase($post_field, $path, $uuid, $overlay=null) + public function setBase($post_field, $path, $uuid, $overlay = null) { if ($this->request->isPost() && $this->request->hasPost($post_field)) { $mdl = $this->getModel(); diff --git a/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/SettingsController.php b/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/SettingsController.php index bdec4a453..82a50bb5f 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/SettingsController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/SettingsController.php @@ -44,10 +44,10 @@ class SettingsController extends ApiMutableModelControllerBase * @param $uuid item unique id * @return array */ - public function getZoneAction($uuid = null) - { - return $this->getBase("zone", "zones.zone", $uuid); - } + public function getZoneAction($uuid = null) + { + return $this->getBase("zone", "zones.zone", $uuid); + } /** * update zone with given properties diff --git a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php index 4766984a1..1a11c2b6c 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php +++ b/src/opnsense/mvc/app/library/OPNsense/Auth/LDAP.php @@ -404,7 +404,7 @@ class LDAP extends Base implements IAuthConnector } else { $user['email'] = ''; } - $result[] = $user ; + $result[] = $user; break; } } diff --git a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php index 7f86fd0a0..7f01d7162 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php +++ b/src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php @@ -336,7 +336,8 @@ class Plugin * iterate through registered rules * @return Iterator */ - public function iterateFilterRules() { + public function iterateFilterRules() + { foreach ($this->filterRules as $prio => $ruleset) { foreach ($ruleset as $rule) { yield $rule; diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php index 423b1a6e9..88a6d79f7 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/InterfaceField.php @@ -78,7 +78,7 @@ class InterfaceField extends BaseField /** * @var bool allow dynamic interfaces */ - private $internalAllowDynamic = false; + private $internalAllowDynamic = false; /** * collect parents for lagg interfaces