Skip to content

Commit 990b919

Browse files
style: ran prettier on changed files
1 parent 7f1bbff commit 990b919

File tree

2 files changed

+45
-15
lines changed

2 files changed

+45
-15
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Tools.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function generate_documentation(): bool {
263263
$required_packages_str = $model->packages ? implode(', ', $model->packages) : 'None';
264264
$requires_auth_str = $endpoint->requires_auth ? 'Yes' : 'No';
265265
$auth_method_str = implode(', ', $endpoint->auth_methods ?: $auth_classes_short);
266-
$applies_immediately = ($model->always_appy) ? 'Yes' : 'No';
266+
$applies_immediately = $model->always_appy ? 'Yes' : 'No';
267267
$cache_class = $model->cache_class ?: 'None';
268268
$operation_id = "$request_method{$endpoint->get_class_shortname()}";
269269

@@ -281,8 +281,8 @@ function generate_documentation(): bool {
281281
"**Supported authentication modes:** [ $auth_method_str ]<br>" .
282282
"**Allowed privileges**: [ $priv_options_str ]<br>" .
283283
"**Required packages**: [ $required_packages_str ]",
284-
"**Applies immediately**: $applies_immediately<br>",
285-
"**Utilizes cache**: $cache_class<br>"
284+
"**Applies immediately**: $applies_immediately<br>",
285+
"**Utilizes cache**: $cache_class<br>",
286286
];
287287

288288
# Nest this endpoint under its assigned or assumed tag

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

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,20 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
9090
*/
9191
public function test_from_internal(): void {
9292
# Create FirewallAlias objects to use for testing purposes
93-
$host_alias = new FirewallAlias(data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []], async: false);
93+
$host_alias = new FirewallAlias(
94+
data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []],
95+
async: false,
96+
);
9497
$host_alias->create();
95-
$net_alias = new FirewallAlias(data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []], async: false);
98+
$net_alias = new FirewallAlias(
99+
data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []],
100+
async: false,
101+
);
96102
$net_alias->create();
97-
$port_alias = new FirewallAlias(data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []], async: false);
103+
$port_alias = new FirewallAlias(
104+
data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []],
105+
async: false,
106+
);
98107
$port_alias->create();
99108

100109
# Create a ForeignModelField object for testing
@@ -113,11 +122,20 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
113122
*/
114123
public function test_to_internal(): void {
115124
# Create FirewallAlias objects to use for testing purposes
116-
$host_alias = new FirewallAlias(data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []], async: false);
125+
$host_alias = new FirewallAlias(
126+
data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []],
127+
async: false,
128+
);
117129
$host_alias->create();
118-
$net_alias = new FirewallAlias(data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []], async: false);
130+
$net_alias = new FirewallAlias(
131+
data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []],
132+
async: false,
133+
);
119134
$net_alias->create();
120-
$port_alias = new FirewallAlias(data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []], async: false);
135+
$port_alias = new FirewallAlias(
136+
data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []],
137+
async: false,
138+
);
121139
$port_alias->create();
122140

123141
# Create a ForeignModelField object for testing
@@ -156,7 +174,10 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
156174
$host_alias->create();
157175
$net_alias = new FirewallAlias(data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []]);
158176
$net_alias->create();
159-
$port_alias = new FirewallAlias(data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []], async: false);
177+
$port_alias = new FirewallAlias(
178+
data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []],
179+
async: false,
180+
);
160181
$port_alias->create();
161182

162183
# Create a ForeignModelField object that can only relate to FirewallAlias objects that are of `type` network
@@ -197,11 +218,20 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
197218
*/
198219
public function test_get_related_model(): void {
199220
# Create FirewallAlias objects to use for testing purposes
200-
$host_alias = new FirewallAlias(data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []], async: false);
221+
$host_alias = new FirewallAlias(
222+
data: ['name' => 'HOST_ALIAS', 'type' => 'host', 'address' => []],
223+
async: false,
224+
);
201225
$host_alias->create();
202-
$net_alias = new FirewallAlias(data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []], async: false);
226+
$net_alias = new FirewallAlias(
227+
data: ['name' => 'NET_ALIAS', 'type' => 'network', 'address' => []],
228+
async: false,
229+
);
203230
$net_alias->create();
204-
$port_alias = new FirewallAlias(data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []], async: false);
231+
$port_alias = new FirewallAlias(
232+
data: ['name' => 'PORT_ALIAS', 'type' => 'port', 'address' => []],
233+
async: false,
234+
);
205235
$port_alias->create();
206236

207237
# Create a non `many` ForeignModelField object
@@ -240,7 +270,7 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
240270
bandwidth: 100,
241271
bandwidthtype: 'Mb',
242272
queue: [['name' => 'TestQueue1', 'qlimit' => 50, 'bandwidth' => 50, 'bandwidthtype' => 'Mb']],
243-
async: false
273+
async: false,
244274
);
245275
$shaper1->create();
246276
$shaper2 = new TrafficShaper(
@@ -249,7 +279,7 @@ class APIFieldsForeignModelFieldTestCase extends TestCase {
249279
bandwidth: 100,
250280
bandwidthtype: 'Mb',
251281
queue: [['name' => 'TestQueue2', 'qlimit' => 50, 'bandwidth' => 50, 'bandwidthtype' => 'Mb']],
252-
async: false
282+
async: false,
253283
);
254284
$shaper2->create(apply: true);
255285

0 commit comments

Comments
 (0)