Skip to content

Commit

Permalink
Add override to return static from the invokable validators call methods
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 20, 2023
1 parent ea966c6 commit cfbc2f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ class PublicationPageValidator extends InvokableAction

protected Validator $validator;

public static function call(...$args): static
{
return parent::call($args);
}

public function __construct(PublicationType $publicationType, string $pageIdentifier)
{
$this->publicationType = $publicationType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class PublicationSchemaValidator extends InvokableAction
protected Validator $schemaValidator;
protected array $fieldValidators = [];

public static function call(...$args): static
{
return parent::call($args);
}

public function __construct(string $pubTypeName)
{
$this->schema = json_decode(Filesystem::getContents("$pubTypeName/schema.json"));
Expand Down

0 comments on commit cfbc2f3

Please sign in to comment.