Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"devDependencies": {
"@prettier/plugin-php": "^0.22.2",
"@prettier/plugin-php": "^0.22.4",
"@stoplight/spectral-cli": "^6.14.2"
}
}
6 changes: 2 additions & 4 deletions pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Auth.inc
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,13 @@ class Auth {
* Provides additional logic whenever authentication is successful. This is intended to be overridden by a
* child Auth class when it needs something specific to happen after a client successfully authenticates.
*/
protected function on_successful_auth(): void {
}
protected function on_successful_auth(): void {}

/**
* Provides additional logic whenever authentication has failed. This is intended to be overridden by a
* child Auth class when it needs something specific to happen after a client fails to authenticate.
*/
protected function on_failed_auth(): void {
}
protected function on_failed_auth(): void {}

/**
* Defines the steps required for users to authenticate wit this authentication method. This method must be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@ class Field {
* @param mixed $value The value being validated. In the event that this is a `many` field, this method will
* receive each value of the array individually, not the array value itself.
*/
public function validate_extra(mixed $value): void {
}
public function validate_extra(mixed $value): void {}

/**
* Ensures this field has a parent model context assigned if a parent model context is required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ class Form {
* Performs tasks when the Form page is initially loaded. This method is intended to be overridden by the child
* class.
*/
public function on_load(): void {
}
public function on_load(): void {}

/**
* Performs validation and saves the Model assigned to this ModelForm.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,8 +1288,7 @@ class Model {
* Allows child classes to define extra validation for their Models. This can be used to build complex validations
* that check conditions between multiple Model fields.
*/
public function validate_extra(): void {
}
public function validate_extra(): void {}

/**
* Performs a full validation on the API model. This includes checking that required packages are installed and
Expand Down Expand Up @@ -1612,15 +1611,13 @@ class Model {
* Initializes the default 'pre_apply' method. This method is intended to be overidden by a child model class and
* is called immediately before the 'apply' method. This method runs regardless of whether an apply was requested.
*/
protected function pre_apply() {
}
protected function pre_apply() {}

/**
* Initializes the default 'apply' method. This method is intended to be overridden by a child model class and is
* responsible for reloading/restarting services after changes occur.
*/
public function apply() {
}
public function apply() {}

/**
* Initializes the default 'pre_apply_create' method. This method is intended to be overridden by a child model class and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,13 @@ class TestCase {
* Sets up the test case before tests are run. This can be overridden by your TestCase to setup shared resources
* required for your tests.
*/
public function setup(): void {
}
public function setup(): void {}

/**
* Tears down the test case after tests are run. This can be overridden by your TestCase to destroy resources
* that may have been created during tests.
*/
public function teardown(): void {
}
public function teardown(): void {}

/**
* Obtains the environment variable with a given name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class Resolver {
* Constructs the GraphQLResolver object with a given Model object.
* @param Model $model The Model object to be used for resolving queries and mutations.
*/
public function __construct(public Model $model) {
}
public function __construct(public Model $model) {}

/**
* A resolver that maps a GraphQL query to the Model's 'query' method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class DHCPServerApply extends Model {
/**
* Overrides the default _create() method but does nothing. This model is only intended to apply pending changes.
*/
protected function _create(): void {
}
protected function _create(): void {}

/**
* Applies changes to the DHCP server configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class DNSForwarderApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending DNS Resolver changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class DNSResolverApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending DNS Resolver changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class HAProxyApply extends Model {
/**
* Overrides the default _create method to do nothing. We only want to apply.
*/
public function _create() {
}
public function _create() {}

/**
* Applies changes to the HAProxy configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class IPsecApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending IPsec changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ class RoutingApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending routing changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class VirtualIPApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class WireGuardApply extends Model {
/**
* Override the _create method so it does nothing. We only want to apply changes when this is called.
*/
public function _create(): void {
}
public function _create(): void {}

/**
* Applies pending DNS Resolver changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,18 +468,14 @@ class GraphQLSchema extends Schema {
# Require an ID if the Model is a many Model
if ($endpoint->model->many) {
$args['id'] = [
'type' => $this->get_model_object_type($endpoint->model_name)
->getField('id')
->getType(),
'type' => $this->get_model_object_type($endpoint->model_name)->getField('id')->getType(),
'description' => 'The ID of the object to read.',
];
}
# Require a parent ID if the Model has a parent Model
if ($endpoint->model->parent_model_class) {
$args['parent_id'] = [
'type' => $this->get_model_object_type($endpoint->model_name)
->getField('parent_id')
->getType(),
'type' => $this->get_model_object_type($endpoint->model_name)->getField('parent_id')->getType(),
'description' => 'The parent ID of the object to read.',
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class IPAddressValidator extends RESTAPI\Core\Validator {
public bool $allow_fqdn = false,
public bool $allow_port = false,
public array $allow_keywords = [],
) {
}
) {}

/**
* Checks if a given value is a valid IP address.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class X509Validator extends Validator {
public bool $allow_prv = false,
public bool $allow_rsa = false,
public bool $allow_ecprv = false,
) {
}
) {}

/**
* Checks if a given value is a valid X509 string.
Expand Down
Loading