diff --git a/src/Assert.php b/src/Assert.php index 923eec2..aa0aca2 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -54,7 +54,7 @@ public static function assertJsonMatchesSchema($content, $schema = null) if ($schema !== null) { $schemaObject = json_decode(file_get_contents($schema)); - self::$schemaStorage->addSchema( 'file://' . $schema, $schemaObject); + self::$schemaStorage->addSchema('file://'.$schema, $schemaObject); } $validator = new Validator(new Factory(self::$schemaStorage)); @@ -78,6 +78,7 @@ public static function assertJsonMatchesSchema($content, $schema = null) * * @param string|null $schema Path to the schema file * @param array|object $content JSON array or object + * * @deprecated This will be removed in the next major version (4.x). */ public static function assertJsonMatchesSchemaDepr($schema, $content) diff --git a/tests/AssertTraitImpl.php b/tests/AssertTraitImpl.php index 345f254..17202e7 100644 --- a/tests/AssertTraitImpl.php +++ b/tests/AssertTraitImpl.php @@ -27,6 +27,7 @@ public function setUp() /** * @param string $id * @param string $schema + * * @return SchemaStorage */ public function testWithSchemaStore($id, $schema) diff --git a/tests/AssertTraitTest.php b/tests/AssertTraitTest.php index f304156..3ca7721 100644 --- a/tests/AssertTraitTest.php +++ b/tests/AssertTraitTest.php @@ -109,10 +109,10 @@ public function testAssertWithSchemaStore() $obj = new AssertTraitImpl(); $obj->setUp(); - $schemastore = $obj->testWithSchemaStore('foobar', (object)['type' => 'string']); + $schemastore = $obj->testWithSchemaStore('foobar', (object) ['type' => 'string']); self::assertInstanceOf('JsonSchema\SchemaStorage', $schemastore); - self::assertEquals($schemastore->getSchema('foobar'), (object)['type' => 'string']); + self::assertEquals($schemastore->getSchema('foobar'), (object) ['type' => 'string']); } public function assertJsonValueEqualsProvider()