Skip to content

Commit 1e35c1b

Browse files
style: run prettier on changed files
1 parent 97323ed commit 1e35c1b

File tree

7 files changed

+154
-165
lines changed

7 files changed

+154
-165
lines changed

composer.lock

Lines changed: 140 additions & 150 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,11 +869,15 @@ class Endpoint {
869869
* Endpoint's assigned $sort_flags property value.
870870
* @throws ValidationError When the `sort_flags` field is not a string or is not a valid sort flags constant.
871871
*/
872-
private function validate_sort_flags(): void
873-
{
872+
private function validate_sort_flags(): void {
874873
# Valid sort_flags options
875874
$flag_opts = [
876-
'SORT_REGULAR', 'SORT_NUMERIC', 'SORT_STRING', 'SORT_LOCALE_STRING', 'SORT_NATURAL', 'SORT_FLAG_CASE'
875+
'SORT_REGULAR',
876+
'SORT_NUMERIC',
877+
'SORT_STRING',
878+
'SORT_LOCALE_STRING',
879+
'SORT_NATURAL',
880+
'SORT_FLAG_CASE',
877881
];
878882

879883
# Only validate this field if the client specifically requested it in the request data

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ class Model {
17161716
parent_id: $this->parent_id,
17171717
sort_by: $this->sort_by,
17181718
sort_order: $this->sort_order,
1719-
sort_flags: $this->sort_flags
1719+
sort_flags: $this->sort_flags,
17201720
);
17211721

17221722
# Loop through the sorted object and assign it's internal value
@@ -1945,9 +1945,7 @@ class Model {
19451945

19461946
# Sort the set if a sort field was provided
19471947
if ($sort_by) {
1948-
$modelset = $modelset->sort(
1949-
fields: $sort_by, order: $sort_order, flags: $sort_flags, retain_ids: true
1950-
);
1948+
$modelset = $modelset->sort(fields: $sort_by, order: $sort_order, flags: $sort_flags, retain_ids: true);
19511949
}
19521950

19531951
# Apply pagination to limit the number of objects returned and/or reverse the order if requested

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ModelSet {
9191
string|array $fields,
9292
int $order = SORT_ASC,
9393
int $flags = SORT_REGULAR,
94-
bool $retain_ids = false
94+
bool $retain_ids = false,
9595
): ModelSet {
9696
# Variables
9797
$model_objects = $this->model_objects;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class IntegerField extends Field {
143143
# Otherwise, the internal value cannot be represented by this Field. Throw an error.
144144
throw new RESTAPI\Responses\ServerError(
145145
message: "Cannot parse IntegerField '$this->name' from internal because its internal value is not a " .
146-
"numeric value. Consider changing this field to a StringField.",
146+
'numeric value. Consider changing this field to a StringField.',
147147
response_id: 'INTEGER_FIELD_WITH_NON_INTEGER_INTERNAL_VALUE',
148148
);
149149
}

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Schemas/OpenAPISchema.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ class OpenAPISchema extends Schema {
356356
'SORT_STRING',
357357
'SORT_LOCALE_STRING',
358358
'SORT_NATURAL',
359-
'SORT_FLAG_CASE'
360-
]
359+
'SORT_FLAG_CASE',
360+
],
361361
],
362362
],
363363
[

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,7 @@ class APIModelsStaticRouteTestCase extends TestCase {
357357
$test_gw->create();
358358

359359
# Create a static route using the gateway above, but do not apply it!
360-
$test_route = new StaticRoute(
361-
gateway: $test_gw->name->value,
362-
network: '1.2.3.4/32'
363-
);
360+
$test_route = new StaticRoute(gateway: $test_gw->name->value, network: '1.2.3.4/32');
364361
$test_route->create();
365362

366363
# Ensure we can update the static route before applying it

0 commit comments

Comments
 (0)