Skip to content

Commit

Permalink
Rename class ValidatesPublicationSchema to PublicationSchemaValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 18, 2023
1 parent 5c221c0 commit 95b1fd4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use function validator;

/**
* @see \Hyde\Publications\Testing\Feature\ValidatesPublicationSchemaTest
* @see \Hyde\Publications\Testing\Feature\PublicationSchemaValidatorTest
*/
class ValidatesPublicationSchema extends InvokableAction
class PublicationSchemaValidator extends InvokableAction
{
protected stdClass $schema;
protected Validator $schemaValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use function dirname;
use function glob;
use Hyde\Hyde;
use Hyde\Publications\Actions\ValidatesPublicationSchema;
use Hyde\Publications\Actions\PublicationSchemaValidator;
use Hyde\Publications\PublicationService;
use InvalidArgumentException;
use function json_encode;
Expand Down Expand Up @@ -74,7 +74,7 @@ protected function validateSchemaFiles(): void

foreach ($schemaFiles as $schemaFile) {
$publicationName = basename(dirname($schemaFile));
$this->results[$publicationName] = ValidatesPublicationSchema::call($publicationName, false)->errors();
$this->results[$publicationName] = PublicationSchemaValidator::call($publicationName, false)->errors();
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/publications/src/Models/PublicationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Hyde\Framework\Concerns\InteractsWithDirectories;
use Hyde\Framework\Features\Paginator;
use Hyde\Hyde;
use Hyde\Publications\Actions\ValidatesPublicationSchema;
use Hyde\Publications\Actions\PublicationSchemaValidator;
use Hyde\Publications\PublicationService;
use Hyde\Support\Concerns\Serializable;
use Hyde\Support\Contracts\SerializableContract;
Expand Down Expand Up @@ -228,6 +228,6 @@ public function validateSchemaFile(bool $throw = true): ?array
{
$method = $throw ? 'validate' : 'errors';

return ValidatesPublicationSchema::call($this->getIdentifier(), $throw)->$method();
return PublicationSchemaValidator::call($this->getIdentifier(), $throw)->$method();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
use Illuminate\Validation\ValidationException;

/**
* @covers \Hyde\Publications\Actions\ValidatesPublicationSchema
* @covers \Hyde\Publications\Actions\PublicationSchemaValidator
*/
class ValidatesPublicationSchemaTest extends TestCase
class PublicationSchemaValidatorTest extends TestCase
{
public function testValidateSchemaFile()
{
Expand Down

0 comments on commit 95b1fd4

Please sign in to comment.