From 71cee23de3b002909bc573dd1cf3fcc74c95eed1 Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Fri, 26 Oct 2018 06:17:34 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Assert.php | 3 ++- tests/AssertTraitImpl.php | 1 + tests/AssertTraitTest.php | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) 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()