From f667c7b8de9ce11d00ff4f055d0557498c37b103 Mon Sep 17 00:00:00 2001 From: jakobvibe Date: Wed, 27 Oct 2021 11:37:51 +0200 Subject: [PATCH] Add types to tests/composer/test/json (#10222) Co-authored-by: Jakob Vibe --- tests/Composer/Test/Json/ComposerSchemaTest.php | 5 +++++ tests/Composer/Test/Json/JsonFileTest.php | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/tests/Composer/Test/Json/ComposerSchemaTest.php b/tests/Composer/Test/Json/ComposerSchemaTest.php index 5c53b2937..24fc50ca1 100644 --- a/tests/Composer/Test/Json/ComposerSchemaTest.php +++ b/tests/Composer/Test/Json/ComposerSchemaTest.php @@ -90,6 +90,11 @@ class ComposerSchemaTest extends TestCase $this->assertTrue($this->check($json), 'stable'); } + /** + * + * @param string $json + * @return mixed + */ private function check($json) { $validator = new Validator(); diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index d93b0414d..0f53b2442 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -354,6 +354,11 @@ class JsonFileTest extends TestCase $this->assertEquals($data, $doubleData); } + /** + * @param string $text + * @param string $json + * @return void + */ private function expectParseException($text, $json) { try { @@ -364,6 +369,13 @@ class JsonFileTest extends TestCase } } + /** + * + * @param string $json + * @param mixed $data + * @param integer|null $options + * @return void + */ private function assertJsonFormat($json, $data, $options = null) { $file = new JsonFile('composer.json');