From 467fe3c1be06830ea4d4b08a86d97d138cce1a24 Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Wed, 27 Oct 2021 20:34:48 +0200 Subject: [PATCH] Add types to `Config` tests (#10234) --- .../Test/Config/JsonConfigSourceTest.php | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/tests/Composer/Test/Config/JsonConfigSourceTest.php b/tests/Composer/Test/Config/JsonConfigSourceTest.php index 8c5d641de..4e1000b5e 100644 --- a/tests/Composer/Test/Config/JsonConfigSourceTest.php +++ b/tests/Composer/Test/Config/JsonConfigSourceTest.php @@ -24,6 +24,11 @@ class JsonConfigSourceTest extends TestCase /** @var string */ private $workingDir; + /** + * @param string $name + * + * @return string + */ protected function fixturePath($name) { return __DIR__.'/Fixtures/'.$name; @@ -143,6 +148,17 @@ class JsonConfigSourceTest extends TestCase $this->assertFileEquals($compareAgainst, $composerJson); } + /** + * @param string $type + * @param string $name + * @param string $value + * @param string $fixtureBasename + * @param string $before + * + * @return string[] + * + * @phpstan-return array{string, string, string, string, string} + */ protected function addLinkDataArguments($type, $name, $value, $fixtureBasename, $before) { return array( @@ -156,8 +172,6 @@ class JsonConfigSourceTest extends TestCase /** * Provide data for testAddLink - * - * @return array */ public function provideAddLinkData() { @@ -192,6 +206,16 @@ class JsonConfigSourceTest extends TestCase ); } + /** + * @param string $type + * @param string $name + * @param string $fixtureBasename + * @param string|null $after + * + * @return string[] + * + * @phpstan-return array{string, string, string, string} + */ protected function removeLinkDataArguments($type, $name, $fixtureBasename, $after = null) { return array( @@ -204,8 +228,6 @@ class JsonConfigSourceTest extends TestCase /** * Provide data for testRemoveLink - * - * @return array */ public function provideRemoveLinkData() {