Skip to content

Fix typos #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
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
2 changes: 1 addition & 1 deletion src/Utils/RenderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function validationError(PropertyValidatorInterface $validator): string
/**
* check if the property may contain/accept null
* - if the property is required the property may never contain null (if it's a null property null is already
* contained in the proprety type hints)
* contained in the property type hints)
* - if the output type is requested null may be contained (if the property was not set)
* if implicitNull is enabled null may be set for the property
* - except the property contains a default value and implicit null is disabled. in this case null is not
Expand Down
4 changes: 2 additions & 2 deletions tests/Basic/SchemaDependencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function invalidSchemaDependencyCompositionDataProvider(): array
}

/**
* @dataProvider validSchemaDependencyNestedObejctDataProvider
* @dataProvider validSchemaDependencyNestedObjectDataProvider
*/
public function testSchemaDependencyNestedObject(array $propertyValue): void
{
Expand All @@ -270,7 +270,7 @@ public function testSchemaDependencyNestedObject(array $propertyValue): void
}
}

public function validSchemaDependencyNestedObejctDataProvider(): array
public function validSchemaDependencyNestedObjectDataProvider(): array
{
return [
'No properties provided' => [[]],
Expand Down
8 changes: 4 additions & 4 deletions tests/Objects/StringPropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function invalidPatternProvider(): array
public function testUnknownFormatThrowsAnException(): void
{
$this->expectException(SchemaException::class);
$this->expectExceptionMessage('Unsupported format onyNumbers');
$this->expectExceptionMessage('Unsupported format onlyNumbers');

$this->generateClassFromFile('StringPropertyFormat.json');
}
Expand All @@ -257,7 +257,7 @@ public function testStringFormatCheckIsValid(): void
{
$className = $this->generateClassFromFile(
'StringPropertyFormat.json',
(new GeneratorConfiguration())->addFormat('onyNumbers', new FormatValidatorFromRegEx('/^\d+$/')),
(new GeneratorConfiguration())->addFormat('onlyNumbers', new FormatValidatorFromRegEx('/^\d+$/')),
);

$object = new $className(['property' => '12345']);
Expand All @@ -270,11 +270,11 @@ public function testStringFormatCheckIsValid(): void
public function testInvalidStringFormatCheck(string $value): void
{
$this->expectException(ErrorRegistryException::class);
$this->expectExceptionMessage('Value for property must match the format onyNumbers');
$this->expectExceptionMessage('Value for property must match the format onlyNumbers');

$className = $this->generateClassFromFile(
'StringPropertyFormat.json',
(new GeneratorConfiguration())->addFormat('onyNumbers', new FormatValidatorFromRegEx('/^\d+$/')),
(new GeneratorConfiguration())->addFormat('onlyNumbers', new FormatValidatorFromRegEx('/^\d+$/')),
);

new $className(['property' => $value]);
Expand Down
2 changes: 1 addition & 1 deletion tests/Schema/StringPropertyTest/StringPropertyFormat.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"properties": {
"property": {
"type": "string",
"format": "onyNumbers"
"format": "onlyNumbers"
}
}
}