Skip to content

Commit 50b8105

Browse files
style: run prettier on changed files
1 parent e90d715 commit 50b8105

4 files changed

Lines changed: 17 additions & 20 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Fields/InterfaceField.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class InterfaceField extends StringField {
219219
foreach ($virtual_ips as $virtual_ip) {
220220
# Only include CARP virtual iPs with unique IDs
221221
if ($virtual_ip['mode'] === 'carp' and $virtual_ip['uniqid']) {
222-
$uniqid = "_vip".$virtual_ip['uniqid'];
222+
$uniqid = '_vip' . $virtual_ip['uniqid'];
223223
$choices[$uniqid] = $uniqid;
224224
}
225225
}

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIFieldsInterfaceFieldTestCase.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ class APIFieldsInterfaceFieldTestCase extends TestCase {
8585
public function test_get_interface_choices_with_allow_carp_interface(): void {
8686
# First, create a carp virtual IP to test with
8787
$vip = new VirtualIP(
88-
interface: "lan",
89-
mode: "carp",
90-
subnet: "127.0.0.99",
88+
interface: 'lan',
89+
mode: 'carp',
90+
subnet: '127.0.0.99',
9191
subnet_bits: 32,
9292
vhid: 99,
93-
password: "test"
93+
password: 'test',
9494
);
9595
$vip->create();
9696

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsOpenVPNClientExportTestCase.inc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class APIModelsOpenVPNClientExportTestCase extends TestCase {
450450
public function test_create_with_server_tls_user_and_local_database(): void {
451451
# First, update the OpenVPNServer to use the 'server_tls_user' mode and local database auth
452452
$this->ovpns->mode->value = 'server_tls_user';
453-
$this->ovpns->authmode->value = ["Local Database"];
453+
$this->ovpns->authmode->value = ['Local Database'];
454454
$this->ovpns->update();
455455

456456
# Setup the export
@@ -464,10 +464,7 @@ class APIModelsOpenVPNClientExportTestCase extends TestCase {
464464
# Ensure the certref's object ID does NOT match the determined crtid. These should not match because
465465
# pfSense now refers to the crtid as the index of the cert in the system/user config, NOT the cert config
466466
# like usual.
467-
$this->assert_not_equals(
468-
$this->user_cert->refid->get_related_model()->id,
469-
$export->locate_crtid()
470-
);
467+
$this->assert_not_equals($this->user_cert->refid->get_related_model()->id, $export->locate_crtid());
471468

472469
# Ensure we can complete the export as intended and that the embedded cert is correct
473470
$export->create();

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsVirtualIPTestCase.inc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,23 +290,23 @@ class APIModelsVirtualIPTestCase extends TestCase {
290290
public function test_nested_vip_under_carp_vip(): void {
291291
# Create a CARP virtual IP to test with
292292
$carp_vip = new VirtualIP(
293-
interface: "lan",
294-
mode: "carp",
295-
subnet: "127.0.0.105",
293+
interface: 'lan',
294+
mode: 'carp',
295+
subnet: '127.0.0.105',
296296
subnet_bits: 32,
297297
vhid: 105,
298-
password: "test",
299-
async: false
298+
password: 'test',
299+
async: false,
300300
);
301301
$carp_vip->create();
302302

303303
# Create a new IP alias virtual IP that uses the CARP virtual IP as its interface
304304
$child_vip = new VirtualIP(
305305
interface: "_vip{$carp_vip->uniqid->value}",
306-
mode: "ipalias",
307-
subnet: "127.0.0.106",
306+
mode: 'ipalias',
307+
subnet: '127.0.0.106',
308308
subnet_bits: 32,
309-
async: false
309+
async: false,
310310
);
311311
$child_vip->create(apply: true);
312312

@@ -315,11 +315,11 @@ class APIModelsVirtualIPTestCase extends TestCase {
315315
$ifconfig = new Command("/sbin/ifconfig $iface");
316316
$this->assert_str_contains(
317317
$ifconfig->output,
318-
"inet 127.0.0.105 netmask 0xffffffff broadcast 127.0.0.105 vhid 105"
318+
'inet 127.0.0.105 netmask 0xffffffff broadcast 127.0.0.105 vhid 105',
319319
);
320320
$this->assert_str_contains(
321321
$ifconfig->output,
322-
"inet 127.0.0.106 netmask 0xffffffff broadcast 127.0.0.106 vhid 105"
322+
'inet 127.0.0.106 netmask 0xffffffff broadcast 127.0.0.106 vhid 105',
323323
);
324324

325325
# Clean up the VIPs we created

0 commit comments

Comments
 (0)