diff --git a/src/Utils/RenderHelper.php b/src/Utils/RenderHelper.php index 61a91f0..86022c3 100644 --- a/src/Utils/RenderHelper.php +++ b/src/Utils/RenderHelper.php @@ -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 diff --git a/tests/Basic/SchemaDependencyTest.php b/tests/Basic/SchemaDependencyTest.php index 4852465..efc6bb0 100644 --- a/tests/Basic/SchemaDependencyTest.php +++ b/tests/Basic/SchemaDependencyTest.php @@ -252,7 +252,7 @@ public function invalidSchemaDependencyCompositionDataProvider(): array } /** - * @dataProvider validSchemaDependencyNestedObejctDataProvider + * @dataProvider validSchemaDependencyNestedObjectDataProvider */ public function testSchemaDependencyNestedObject(array $propertyValue): void { @@ -270,7 +270,7 @@ public function testSchemaDependencyNestedObject(array $propertyValue): void } } - public function validSchemaDependencyNestedObejctDataProvider(): array + public function validSchemaDependencyNestedObjectDataProvider(): array { return [ 'No properties provided' => [[]], diff --git a/tests/Objects/StringPropertyTest.php b/tests/Objects/StringPropertyTest.php index 211ea8d..4aebd75 100644 --- a/tests/Objects/StringPropertyTest.php +++ b/tests/Objects/StringPropertyTest.php @@ -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'); } @@ -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']); @@ -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]); diff --git a/tests/Schema/StringPropertyTest/StringPropertyFormat.json b/tests/Schema/StringPropertyTest/StringPropertyFormat.json index 251ded2..a5b285e 100644 --- a/tests/Schema/StringPropertyTest/StringPropertyFormat.json +++ b/tests/Schema/StringPropertyTest/StringPropertyFormat.json @@ -3,7 +3,7 @@ "properties": { "property": { "type": "string", - "format": "onyNumbers" + "format": "onlyNumbers" } } } \ No newline at end of file