Skip to content

Commit

Permalink
style: ran prettier on changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhendrickson13 committed May 18, 2024
1 parent 8f71339 commit fc1a616
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ class DHCPServer extends Model {
$this->interface = new InterfaceField(
required: true,
representation_only: true,
help_text: 'The interface to configure the DHCP server for. This field is only necessary when you want'.
'to change the interface (ID) of an existing DHCP server, or you are replacing all DHCP server objects '.
'with a new configuration. Note that specifying an interface in this field will update the ID of the '.
'DHCP server to match the interface specified here. Leaving this field empty will retain the '.
'existing interface.'
help_text: 'The interface to configure the DHCP server for. This field is only necessary when you want' .
'to change the interface (ID) of an existing DHCP server, or you are replacing all DHCP server objects ' .
'with a new configuration. Note that specifying an interface in this field will update the ID of the ' .
'DHCP server to match the interface specified here. Leaving this field empty will retain the ' .
'existing interface.',
);
$this->enable = new BooleanField(default: false, help_text: 'Enable the DHCP server for this interface.');
$this->range_from = new StringField(
Expand Down Expand Up @@ -514,7 +514,7 @@ class DHCPServer extends Model {
* method to associate DHCP server objects with the requested interface.
*/
public function get_next_id(): string {
return $this->interface->_to_internal($this->interface->value) ?: "unknown";
return $this->interface->_to_internal($this->interface->value) ?: 'unknown';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class VirtualIPApply extends Model {
* @return array The internal value array to be loaded by this model as the internal callable
*/
public function get_applied_status(): array {
return ['applied' => !is_file("/tmp/.firewall_virtual_ip.apply")];
return ['applied' => !is_file('/tmp/.firewall_virtual_ip.apply')];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class APIModelsVirtualIPApplyTestCase extends TestCase {
*/
public function test_apply(): void {
# Simulate serialized changes and ensure applied is seen as false
file_put_contents('/tmp/.firewall_virtual_ip.apply', "");
file_put_contents('/tmp/.firewall_virtual_ip.apply', '');
$vip_apply = new VirtualIPApply(async: false);
$this->assert_is_false($vip_apply->applied->value);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class APIModelsVirtualIPTestCase extends TestCase {
'subnet' => '1.2.3.4',
'subnet_bits' => 24,
],
async: false
async: false,
);
$test_model_1->create();

Expand All @@ -109,7 +109,7 @@ class APIModelsVirtualIPTestCase extends TestCase {
'subnet' => '1.2.3.4',
'subnet_bits' => 24,
],
async: false
async: false,
);
$test_model->create(apply: true);
$ifconfig = new Command('ifconfig');
Expand Down Expand Up @@ -145,7 +145,7 @@ class APIModelsVirtualIPTestCase extends TestCase {
'advskew' => 11,
'password' => 'testpasswd',
],
async: false
async: false,
);
$test_model->create(apply: true);
$ifconfig = new Command('ifconfig');
Expand Down Expand Up @@ -189,7 +189,7 @@ class APIModelsVirtualIPTestCase extends TestCase {
'subnet' => '1.2.3.4',
'subnet_bits' => 32,
],
async: false
async: false,
);
$test_model->create(apply: true);
$choparp = new Command('/usr/bin/top -baHS 999 | grep choparp');
Expand Down Expand Up @@ -223,7 +223,7 @@ class APIModelsVirtualIPTestCase extends TestCase {
'password' => 'testpasswd',
'vhid' => 5,
],
async: false
async: false,
);
$carp_vip->create(apply: true);

Expand Down

0 comments on commit fc1a616

Please sign in to comment.